Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
siuchan
Frequent Visitor

Percentage Sum Total

I would like to write a new measure to calculate the % of the total for the period. I can calculate the sum score for the whole table, but not by the period. Thanks,   

 

Company    Period   Score   % total for the period 

A                    Q1       2          16.7%

A                     Q2     3           27.3%

B                    Q1      4           33.3%

B                   Q2       5           45.5%

C                   Q1       6           50%

C                   Q2       3            27.3%

 

 

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@siuchan,

 

You may try using ALLSELECTED Function.

Measure =
DIVIDE (
    SUM ( Table1[Score] ),
    CALCULATE ( SUM ( Table1[Score] ), ALLSELECTED ( Table1[Company] ) )
)
Community Support Team _ Sam Zha
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

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@siuchan,

 

You may try using ALLSELECTED Function.

Measure =
DIVIDE (
    SUM ( Table1[Score] ),
    CALCULATE ( SUM ( Table1[Score] ), ALLSELECTED ( Table1[Company] ) )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vvelarde
Community Champion
Community Champion

@siuchan

 

Hi, try with this measure

 

% Total for Period =
VAR TotalPeriod =
    CALCULATE ( SUM ( Table1[ Score ] ), ALLEXCEPT ( Table1, Table1[  Period ] ) )
RETURN
    DIVIDE ( SUM ( Table1[ Score ] ), TotalPeriod )

Regards

 

Victor

 




Lima - Peru

Thanks for your suggestion. I tried it. But, it gave me the sum of the whole table. only If i specific the time period with the slider, they i can get the total sum % at the specific period. 

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.