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.
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!
Solved! Go to Solution.
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!
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!
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
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
@Tjeerd , refer this can help
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
105 | |
88 | |
74 | |
66 |
User | Count |
---|---|
126 | |
111 | |
100 | |
83 | |
71 |