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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.