Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
区分ごとに表示した数値があり、メジャーで区分ごとの構成比を作成しています。さらに
数値と構成比率を掛け合わせた数値をメジャーで算出していますが
下記に記載のようになっています。
※区分はAのほかにBやCもあります。
本来であれば算出値の合計「37」が表示されるはずですが、
どのようなDAX式を記載すればよいでしょうか。
▼×(現在)
区分する | 値 | % | 算出値 |
あ | 10 | 10 | 1 |
あ | 10 | 10% | 1 |
あ | 30 | 30% | 9 |
あ | 50 | 50% | 25 |
合計 | 100 | 100% | 100 |
▼〇
区分する | 値 | % | 算出値 |
あ | 10 | 10 | 1 |
あ | 10 | 10% | 1 |
あ | 30 | 30% | 9 |
あ | 50 | 50% | 25 |
合計 | 100 | 100% | 37 |
※使用しているメジャーは以下の通りです。
%= DIVIDE([合計]、CALCULATE([合計]、ALLEXCEPT( 'table1'、 'table1' [type]))、0)
計算値= [合計] * [%]
Solved! Go to Solution.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario.
Table:
Then you may create two measures as below.
% =
DIVIDE(
SUM('Table'[Value]),
CALCULATE(
SUM('Table'[Value]),
ALL('Table')
)
)
Result =
SUMX(
'Table',
[%]*'Table'[Value]
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
Based on your description, I created data to reproduce your scenario.
Table:
Then you may create two measures as below.
% =
DIVIDE(
SUM('Table'[Value]),
CALCULATE(
SUM('Table'[Value]),
ALL('Table')
)
)
Result =
SUMX(
'Table',
[%]*'Table'[Value]
)
Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
See, if you are looking for
https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |