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.
Is it possible to filter only one level of a matrix? Lets say I have two levels in a matrix State and City. State displays total revenue per state as it should. But when I drill down to city, I only want it to display the top 20 cities based on their revenue instead of lisiting all the citites and their revenue.
However, when I add this into the visual level filter it also filters my first level of the matrix and will only display the revenue amount of the top 20 cities in the state format.
How do I get it to show total revenue by State for every data point in the first level of the matrix but then when I drill down it shows only the top 20 citites by revenue?
Solved! Go to Solution.
Hello @Wkeith
Sorry about that, had to take it one step further, give this a try.
Filter Measure = VAR RankingContext = VALUES ( FactSales[City] ) RETURN IF ( ISINSCOPE ( FactSales[City] ), CALCULATE ( [TOTALREVENUE], TOPN ( 20, ALL ( FactSales[City] ), [TOTALREVENUE] ) ,RankingContext ), [Sales Amount])
Hello @Wkeith
You can use something like
Measure = IF ( ISINSCOPE ( Table[City] ), CALCULATE ( TOPN ( 20, VALUES ( Table[City] ), [Amount] ) ), [Amount] )
Hello @Wkeith
Sorry about that, had to take it one step further, give this a try.
Filter Measure = VAR RankingContext = VALUES ( FactSales[City] ) RETURN IF ( ISINSCOPE ( FactSales[City] ), CALCULATE ( [TOTALREVENUE], TOPN ( 20, ALL ( FactSales[City] ), [TOTALREVENUE] ) ,RankingContext ), [Sales Amount])
Had to add a small filter to get the cities with 0 revenue to not show but yup this worked! Thanks for the help!
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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |