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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Filter TOPN Values of a Measure

Good Morning,

 

I'm new to DAX

 

So I have this Dataset(Values Removed):

PS3.jpg

 

From it I did a Measure:

 

PS2.JPG

 

The Idea is to show the 15 Worses of this measure inside a Table:

 

PS1.jpg

 

Since its a Measure I was not able to filter by TOPN using the Visual Filter.

 

So What i thought was to do another Measure, a RANKX that would RANK the worst values of DesvioOrcadoAtéOMesAtual Measure and then use the Visual Filter to Filter numbers smaller than 15:

 

PS4.JPG

[EDIT]:

 

Pos = IF(NOT(ISBLANK(Desvio[DesvioOrçadoAtéMesAtuall])),RANKX(ALLSELECTED(Desvio),Desvio[DesvioOrçadoAtéMesAtuall],,1))
 
Did this change but did not work.
[/EDIT]
 

The Problem was that as we can see the "Pos" Column repeat a lot of time the same RANK Number.... And the values are different so it should not.

 

I want to be able to filter by the left filter of departaments, so when has no filter i would show the worst values at all and when its filtered by departament it would show the 15 worses values of that departament....

3 REPLIES 3
Anonymous
Not applicable

Believe the problem is linked to the CALCULATE measure , perhaps the FILTER is messing with the values... but aint sure.... 

Anonymous
Not applicable

Thanks Harsh Natani,

 

The thing is the values in the column i want to rank are not the same... In fact they are quite different.... So the tutorial did not help... But thanks a lot!

 

Regards,

 

[EDIT]

 

Unknown-2.jpeg

 

Just to Show that the RANK has no sense at all(sorry for the img quality, forgot to ss before

 

[/EDIT]

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors