Percentage of Parent Row Total or percentage of Parent Column Total in new function pivot

1 回表示 (過去 30 日間)
Marco Riani
Marco Riani 2023 年 2 月 15 日
コメント済み: Gian23 2025 年 3 月 11 日
I wonder if it is possible in the new function pivot (MATLAB prerelease 2023A) to produce a pivot table which shows values in percentage of Parent Row Total or percentage of Parent Column Total.
So far it seems to me there is just the possibility of specifying "percentage" that is percentage with respect to grand total and it is not clear to me whether it is possibile to obtain percentages of Parent Row (Column) Total with a function handle.
Of course I can first obtain the initial pivot with the raw data and then with one line of code to obtain the percentage of Parent Row (Column), however it is interesting to know whether this can be done directly with a call to pivot.

回答 (1 件)

Pratheek
Pratheek 2023 年 3 月 30 日
Based on the documentation of the new pivot function in MATLAB prerelease 2023a, it seems that it does not have built-in support for calculating percentages of parent row or column total.
  2 件のコメント
Marco Riani
Marco Riani 2023 年 3 月 30 日
Yes, I fully agree. The question is whether it is possible to obtain them with a function handle in option 'Method'. In my opinion it is not possible. Could you please confirm it?
Gian23
Gian23 2025 年 3 月 11 日
I have the same problem, is there any news on the horizon?

サインインしてコメントする。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by