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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
amirghaderi
Helper IV
Helper IV

Percentage of total not calculated correctly when filter applies

As you see in the below table, the BLMid% has been calculated correctly and the total and each line % is correct. (no filter has been aplied to the table)

amirghaderi_2-1626853506887.png

 

As soon as I apply a slicer filter, then the % does not get calculated correctly for the filtered data. 

I expcet in the below table 16.88% to be 100% and each row to be % of that line to the filtered total

 

amirghaderi_1-1626853470682.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

hi @amirghaderi ,

 

Please try

BLMID% = table1[BLMIDHOUR]/calculate(sum(table1[BLMIDHOUR]),FILTERS(table1[Month]))

 

If this does not work, can you share PBIX file?

 

Thanks!

 

PS: Please accept the solution if it works!!! 🙂

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

hi @amirghaderi ,

 

Please try

BLMID% = table1[BLMIDHOUR]/calculate(sum(table1[BLMIDHOUR]),FILTERS(table1[Month]))

 

If this does not work, can you share PBIX file?

 

Thanks!

 

PS: Please accept the solution if it works!!! 🙂

It works well with date as the row measurement. but, can this be done dynamicly. for example, if I change the row grouping to something else, then does not calculate correctly, example as below:

 

amirghaderi_0-1626856301336.png

 

Anonymous
Not applicable

hi @amirghaderi 

 

Couldn't think of any other way, but in case there are not many grouping, try this

 

Please try

BLMID% = table1[BLMIDHOUR]/calculate(sum(table1[BLMIDHOUR]),FILTERS(table1[Month]),FILTERS(table1[Status]),FILTERS(table1[column3]))

 

Thanks!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.