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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Tjeerd
Frequent Visitor

Isolate measure from graph category

Hi all,

 

I have found a lot of answers to questions I had on this forum. Now I encounter a challenge to which I cannot find a comparable post yet. 

 

I want to present a distribution of shipment methods. If the total number of shipments is equal of greater than 30, I deem the distribution to be representative. If so, I want to color the bars white. If total shipments <30, I want to color the bars pink. 

 

Challenge I encounter, is that the category drills down the total shipments, and colors the bars based on number of shipments per category. 

 

I tried to workaround this, by setting a measure: if #shipments >30, true = 1, false = 0.

However, also doing it this way, the shipments are also drilled down by the category.

 

Is there a way to isolate the measurement from this? While still being affected by a date slicer for instance? 

 

Please see the link for a better understanding of my challenge. I want to have all bars pink if total shipment <30, white if >29.

 

Thank you in advance!

 

https://imgur.com/LddbULt

1 ACCEPTED SOLUTION
Tjeerd
Frequent Visitor

Hi all,

 

First of all thank you for your your replies and the time you put into my challenge!

I did not came directly to the solution using yourt input on my challenge. In fact I was a bit overwhelmed by the complexity of especially the references to hierachies and INSCOPE functions. 

 

After a lot of searching and reading through a lot more of complex solution, I found a solution very deas imple as I was expected it to be. 

 

First I created the following formula:

 

#ShipmentsAllMethods = Calculate(Sum('table1'[Shipments]), ALL('table1'[Shipment_method])

 

Then I created a conditional data color formatting, where if the value is between 0-30 light pink, when value > 30 white.

 

I did the same for creating graphs with other categories like payment_method or shipment_country.

 

Hope this simple solution will help others with the same problem. 

 

Again, many thanks guys!

View solution in original post

5 REPLIES 5
Tjeerd
Frequent Visitor

Hi all,

 

First of all thank you for your your replies and the time you put into my challenge!

I did not came directly to the solution using yourt input on my challenge. In fact I was a bit overwhelmed by the complexity of especially the references to hierachies and INSCOPE functions. 

 

After a lot of searching and reading through a lot more of complex solution, I found a solution very deas imple as I was expected it to be. 

 

First I created the following formula:

 

#ShipmentsAllMethods = Calculate(Sum('table1'[Shipments]), ALL('table1'[Shipment_method])

 

Then I created a conditional data color formatting, where if the value is between 0-30 light pink, when value > 30 white.

 

I did the same for creating graphs with other categories like payment_method or shipment_country.

 

Hope this simple solution will help others with the same problem. 

 

Again, many thanks guys!

v-lili6-msft
Community Support
Community Support

hi  @Tjeerd 

For your case, adjst the rule measure as below:

Morethan 30 = IF(CALCULATE([#shipments],FILTER(ALLSELECTED('Table'),'Table'[Level1]=MAX('Table'[Level1])))>30,1,0)

 

Regards,

Lin

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

Hi,

 

Thank you for your answer. Really think this is into the right direction. I have a question however. What do I fill in for [Level1]? What does that include? Do I have to fill in the column I don't want to filter? 

And, what if there are two columns I want to exclude from filtering? Do I have to make a seperate measurement for that? 

 

 

Thank you in advance!

 

BR Tjeerd

hi  @Tjeerd 

If so, you need make a seperate measurement for that, then use ISINSCOPE function to create a IF measure for them

https://xxlbi.com/blog/new-dax-function-isinscope/

 

if you still have the problem, please share your sample pbix file and your expectedoutput.

 

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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