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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Dynamic

Hello,

 

Can anyone guide me how to make top 10 business process type dynamic?

please refer to the below image -

 

alpha_123_0-1618236505446.png

In the above image top 10 business process type is showing..I want to give an option where user can select business process type as per their choice. It may be top 5, 6,9 etc..

 

Thanks for help!

 

8 REPLIES 8
Anonymous
Not applicable

Hi @Anonymous,

Can you please share some dummy data with a similar data structure and expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Anonymous , Not very clear.

 

You can Create TOP N with what if

Refer
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak I have edited the post.

@Anonymous , Blog I posted may be relevant , check that

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak , I tried by following the link you have shared but it's not working.

alpha_123_0-1619111200900.png

 measure that I am using- 

TopN =
VAR SelectedTop = SELECTEDVALUE('Parameter'[Parameter])
RETURN
SWITCH(TRUE(),
SelectedTop = 0, COUNT('table'[field]),
RANKX (
ALLSELECTED( 'table'),
COUNT('table'[field])
)
<= SelectedTop,
COUNT('table'[field]))
Anonymous
Not applicable

HI @Anonymous,

It should help if you provide a pbix file with some dummy data to test.
Regards,
Xiaoxin Sheng

Anonymous
Not applicable

Hello @Anonymous , I could do the dynamic top N selection. But the problem I am facing is it's working only on List or on dropdown.

 

alpha_123_0-1619706141469.png

 

I want  to do it on slider. But not working...

alpha_123_1-1619706178175.png

 

 

The measure I am using is = 

TOPN_BP =
VAR SelectedTop= SELECTEDVALUE(TopN[TopN])
Return
SWITCH(TRUE(),
SelectedTop=0, [Measure],
RANKX(
ALLSELECTED(Table[field]),
[Measure]
)
<=SelectedTop,
[Measure]
)
 
 
Can you tell me why it's not working on slider?
Anonymous
Not applicable

HI @Anonymous,

I think this should be related to selectedvalue function that you used to extract current data.

If you do not add 'alternateResult' in this function, it will return blank if the current selection equal to multiple values. (slider mode normally pick up the range of values)

SELECTEDVALUE function - DAX | Microsoft Docs

You can try to use the following measure formula if it works for your scenario:

TOPN_BP =
VAR SelectedTop =
    SELECTEDVALUE ( TopN[TopN], MAX ( TopN[TopN] ) )
RETURN
    SWITCH (
        TRUE (),
        SelectedTop = 0, [Measure],
        RANKX ( ALLSELECTED ( Table[field] ), [Measure] ) <= SelectedTop, [Measure]
    )

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.