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
navneet0512
Helper III
Helper III

Want slicer filter for top 10 & top 100 order count.

I want to sclicer filter from where I can select top 5 top 10 top 100 on order count .

navneet0512_1-1713863890007.png

 

 

1 ACCEPTED SOLUTION

Hi @navneet0512 ,

 

Update the [Flag] measure.

Flag = SWITCH(TRUE(),
ISFILTERED('Slicer'[Slicer])=FALSE(),1,
SELECTEDVALUE('Slicer'[Slicer])="top 5" && [rank measure]<=5,1,
SELECTEDVALUE('Slicer'[Slicer])="top 10" && [rank measure]<=10,1,
SELECTEDVALUE('Slicer'[Slicer])="top 100" && [rank measure]<=100,1,0)

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-tangjie-msft
Community Support
Community Support

Hi @navneet0512 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1713924326830.png

(2) We can create a table.

Slicer = DATATABLE ( 
    "Slicer", STRING, "Index",INTEGER,
    {
        { "top 5",1},
        { "top 10",2 },
        { "top 100",3 }
    }
) 

(3) We can create a measure.

Flag = SWITCH(TRUE(),
ISFILTERED('Slicer'[Slicer])=FALSE(),1,
SELECTEDVALUE('Slicer'[Slicer])="top 5" && MAX('Table'[rank])<=5,1,
SELECTEDVALUE('Slicer'[Slicer])="top 10" && MAX('Table'[rank])<=10,1,
SELECTEDVALUE('Slicer'[Slicer])="top 100" && MAX('Table'[rank])<=100,1,0)

(4) Place [Flag=1] on the visual object screening and then the result is as follows.

vtangjiemsft_1-1713924443562.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

navneet0512_0-1713953273000.png

Rank is measure created on count of order number .

 

Hi @navneet0512 ,

 

Update the [Flag] measure.

Flag = SWITCH(TRUE(),
ISFILTERED('Slicer'[Slicer])=FALSE(),1,
SELECTEDVALUE('Slicer'[Slicer])="top 5" && [rank measure]<=5,1,
SELECTEDVALUE('Slicer'[Slicer])="top 10" && [rank measure]<=10,1,
SELECTEDVALUE('Slicer'[Slicer])="top 100" && [rank measure]<=100,1,0)

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.

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.