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.
I am trying to create a chart that includes both the top 10 and bottom 5 items. I have looked high and low and I cannot figure it out. I am able to get them each separately, but showing them in the same bar chart has been a challenge.
The core table 'Daily Margin' has a row for each product sold for the day and its raw margin. I also have the following measures:
I currently have two bar charts
They work great, but I would like the results of both to be combined in one chart. I tried creating a calculated column (and measure for that matter) that would be TRUE() if either of the above RANKX measures were true, with the intent to filter the chart on the calculated column but that did not work--the calculated columns always returned TRUE():
Top15Bottom5 = if(OR([Rank (Desc) of Product Line by RM] <= 15, [Rank (Asc) of Product Line by RM] <= 5),TRUE(), FALSE())
I thought of calculating the MAX number of ranks and taking the top 15 and bottom 5:
RankCount = MAXX('Daily Margin',RANKX(ALLSELECTED('Daily Margin'[Product Line]),[Sum of RM],,DESC))
But I can't use use formulas in filter conditions, ex: Rank (Desc) is less than or equal to 15 OR Rank (Desc) is greater than or equal to ([RankCount] - 5)
HELP??? Thanks!
Solved! Go to Solution.
Create a new Measure:
Flag = if(or([Rank (Desc) of Product Line by RM] <16;[Rank (Asc) of Product Line by RM]<6);1;0)
In visual level filter Use Flag equal to 1
Both Ranks are measures too.
Create a new Measure:
Flag = if(or([Rank (Desc) of Product Line by RM] <16;[Rank (Asc) of Product Line by RM]<6);1;0)
In visual level filter Use Flag equal to 1
Both Ranks are measures too.
If it were a snake it would have bit me. Thanks!
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 |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
147 | |
107 | |
105 | |
87 | |
61 |