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

Filter and sclicer causing visualization discrepency

Hi

I am a beginner in Power BI and I would like to know the feasibility/solution for my Queries.

 

For a given data table "Prototype Modeling_freight" I have a measure as:

 

volume = SUMX('Prototype Modeling_Freight', 'Prototype Modeling_Freight'[Sold Cases])

 

this converted to percentage for each type of equipment as:

 

Volume distribution = DIVIDE([volume],CALCULATE([volume],ALL('Prototype Modeling_Freight'))),0)

 


And visualized as clustered column chart

1.PNG

Now there are specifically two things I want this chart to do:

when I filter out through a date sclicer my chart must compare the data only within those sclicers, (note these sclicers can be other than dates)

Eg:

2.PNG

If you consider the Y axis in above picture, I want them to present 100%, or 'what was 25N's contribution in June month?'.

 

 

 

Thank you

 

 

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Parthsh93 

 

Try this instead

Volume distribution = DIVIDE([volume],CALCULATE([volume],ALLSELECTED())),0)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

View solution in original post

4 REPLIES 4
Mariusz
Community Champion
Community Champion

Hi @Parthsh93 

 

Try this instead

Volume distribution = DIVIDE([volume],CALCULATE([volume],ALLSELECTED())),0)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn


 

Thank you @Mariusz, it worked. I would like to understand how is this happening?

 

Hi @Parthsh93 

 

Sure, ALL() removes all filters from the filter context where ALLSELECTED() only the current one ie current visuals filters preserving all other filters coming from outside.

For more info please refer.

https://www.sqlbi.com/articles/the-definitive-guide-to-allselected/

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Thank You,
But the article you have suggested is too complex to understand and time consuming. 

I need simpler definition.

 

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