cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mintia
Frequent Visitor

「構成比 * 値」の計算について

区分ごとに表示した数値があり、メジャーで区分ごとの構成比を作成しています。さらに
数値と構成比率を掛け合わせた数値をメジャーで算出していますが
下記に記載のようになっています。
※区分はAのほかにBやCもあります。

 

本来であれば算出値の合計「37」が表示されるはずですが、
どのようなDAX式を記載すればよいでしょうか。


▼×(現在)

区分する算出値
10101
1010%1
3030%9
5050%

25

合計100100%

100


▼〇

区分する算出値
10101
1010%1
3030%9
5050%

25

合計100100%

37

 

※使用しているメジャーは以下の通りです。

 

%= DIVIDE([合計]、CALCULATE([合計]、ALLEXCEPT( 'table1'、 'table1' [type]))、0)

 

計算値= [合計] * [%]

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft v-alq-msft
Microsoft

Re: 「構成比 * 値」の計算について

Hi, @mintia 

 

Based on your description, I created data to reproduce your scenario.

Table:

f1.png

 

Then you may create two measures as below.

 

% = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALL('Table')
    )
)

Result = 
SUMX(
    'Table',
    [%]*'Table'[Value]
) 

 

 

Result:

f2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Super User IV
Super User IV

Re: 「構成比 * 値」の計算について

See, if you are looking for

https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


Microsoft v-alq-msft
Microsoft

Re: 「構成比 * 値」の計算について

Hi, @mintia 

 

Based on your description, I created data to reproduce your scenario.

Table:

f1.png

 

Then you may create two measures as below.

 

% = 
DIVIDE(
    SUM('Table'[Value]),
    CALCULATE(
        SUM('Table'[Value]),
        ALL('Table')
    )
)

Result = 
SUMX(
    'Table',
    [%]*'Table'[Value]
) 

 

 

Result:

f2.png

 

Best Regards

Allan

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors