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
JWick1969
Helper IV
Helper IV

Dividing row level value with row level total to get %

Hi All,

 

I have a matrix with "fg year and month rows" and "received date" in the column.

the matrix shows the count of fg in each received month. I want to add a % for each value using the fg total row (row level value divided by fg total value.

 

Example data like below.

Oct 2021 rows and Oct 2021 column the % should be 100%(4622/fg total 6422)

Nov 2021 row and Oct 2021 column the % should be 59.04%(4652/fg total 7883), Nov 2021 column 40.96%(3229/7883)

and so on...


Trying out this code and gives me wrong % value.

DIVIDE(SUM(table[FG count]),CALCULATE(SUM(table[FG Count]),ALLEXCEPT(table,table[DateFG])),0)

 

 

sample.jpg

 

Thank you in advance

 

1 ACCEPTED SOLUTION
JWick1969
Helper IV
Helper IV

Trying this code and so far its working.

% of total =

VAR fg_volume = CALCULATE([fg count],ALL(table[Receipt Month]), ALL(table[FG date]))
RETURN DIVIDE([fg], fg_volume)
 
JWick1969_0-1653743071764.png

 

 

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @JWick1969 ,

It seems you have solved the issue. Please kindly mark your answer as a solution to help more people find the answer.  

If I have misunderstood your meaning, please provide the output you want in the form of a picture.

 

 Best Regards
Community Support Team _ Polly

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

JWick1969
Helper IV
Helper IV

Trying this code and so far its working.

% of total =

VAR fg_volume = CALCULATE([fg count],ALL(table[Receipt Month]), ALL(table[FG date]))
RETURN DIVIDE([fg], fg_volume)
 
JWick1969_0-1653743071764.png

 

 

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.

Top Solution Authors