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.
anyone know how to use PowerBi to filter Top 10 Top 5 Top 3 negative number?
example:
kent -2000
jack -3000
kiki 2000
yuki -1000
yoyo 3000
i want result:
Jack -3000
kent -2000
yuki -1000
TOPN has an option to sort ascending or descending
already tried TOPN, cannot ascending or descending, and that way is very troublesome...
actually i want like this, https://www.youtube.com/watch?v=SsZseKOgrWQ&feature=youtu.be
but this one no teach how to filter negative number, and i'm tried got some error there.
Hi, Try with this method:
Create a Table with:
Create a measure to Rank:
Ranking = RANKX ( ALLSELECTED ( Table1 ); CALCULATE ( SUM ( Table1[Profit] ) );; ASC )
Create another measure to include or exclude in the visual:
InTop = VAR TOPSELECTED = SELECTEDVALUE ( Tops[Top] ) RETURN IF ( [Ranking] <= TOPSELECTED; "INCLUDE"; "EXCLUDE" )
Alternative 1
And in the Visual LeveL Filter
Alternative 2
In your Profit Measure add this:
ProfitM = IF ( [InTop] = "INCLUDE"; SUM ( Table1[Profit] ); BLANK () )
Ready.
Regards
Victor
Lima - Peru
Hi @Vvelarde
i use your formula got 1 problem, if i choose filter top 3 client, there will filter negative and positive value...
i want that results is separate top 3 negative value client and top 3 positive value client...can make that negative and positive button to choose ?
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |