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
SimonGrams
Helper I
Helper I

Percentage of Total based on Dynamic Filters (Sum = 100%)

Hello everybody,

 

I try to rebuild the quick calculation "Percentage of total" in a new measure.

 

Measure = 

VAR Volume =
   '2_komplett'[Sessions]
VAR AllVolume =
   CALCULATE('2_komplett'[Sessions];ALL('2_komplett'))

RETURN
    DIVIDE ( Volume; AllVolume )

As long as I do not use any filters the result is just the way I want it to be (below both percentages next to each other, '%SG: Sessions' is the result of the quick calulation):

 

1.JPG

 

But as I use a filter (eg country, device) my measure still adjusts to the grand total. I want my measure to adjust to the filter (filtered value is new total ---> Sum is 100 %) - just as the quick calculation.

 

2.JPG

 

Does anyone know the solution to my problem?

 

Thanks in advance

 

 

1 ACCEPTED SOLUTION
tringuyenminh92
Memorable Member
Memorable Member

Hi @SimonGrams,

 

You could try ALLEXCEPT(table,columnyouwanttofilter) instead of ALL method. Hope it works

View solution in original post

2 REPLIES 2
tringuyenminh92
Memorable Member
Memorable Member

Hi @SimonGrams,

 

You could try ALLEXCEPT(table,columnyouwanttofilter) instead of ALL method. Hope it works

Hi @tringuyenminh92,

 

works perfect, thanks a lot!!

I use 2 filters in my report: Country & Device

 

Measure = 

VAR Volume =
   '2_komplett'[Sessions]
VAR AllVolume =
   CALCULATE('2_komplett'[Sessions];ALLEXCEPT('2_komplett';'2_komplett'[Country];'2_komplett'[Device]))

RETURN
    DIVIDE ( Volume; AllVolume )

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.