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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Mastema
Frequent Visitor

How to combine numbers and the word "ALL" in a filter?

Hi guys,

 

I wonder if it was possible to combine numbers and a word (namely "All") in a filter?

 

At this point I have a table built explicitely for a Filter (it has values as follows: 5, 10, 25, 50, 100, 500), as I need it to adjust the report for the Top N (a number chosen in a Filter) Firms. 

 

Still, as my formula goes as follows: SelectedTopNNumber = MAX('TopN Options'[TopN]),

it won't show the result for all the Firms(700+ and counting), but for 500 Top Firms.

To manually change the maximum value in a Filter is not an option, as it takes too much time and is not efficient 

 

("All" should refer to the VIEW_KOMPONENTE_UMSATZ'[VM_Firma])

 

Would be grateful if you'll help me solve the problem Smiley Happy

5 REPLIES 5
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Mastema,

 

I suppose that you have a [Rank] measure and a [check] measure similar to below. And you added [check] measure to visual level filter so that visual always returns TopN records.

check = IF([Rank]<=[SelectedTopNNumber],1,0)

 

In your scenario, to make the visual to show all the Firms(700+ and counting) when there is no selection in slicer, please modify the [check] measure to:

check = IF(ISFILTERED('TopN Options'[TopN]), IF([Rank]<=SelectedTopNNumber,1,0),1)

 

1.PNG2.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-yulgu-msft Thanks for the answer!

Yes, I was using the [check] measure similar to the one you proposed 🙂

 

Still, the issue is that I can't make the graphs show the overall amount, if there is no measure chosen in the Filter (as there is a max of 500 in the TopN Filter)

 

I have the following steps for Filtering:

 

Total Premium Booked= SUM('acc VIEW_KOMPONENTE_UMSATZ'[Premium])

 

Rank = RANKX(All('acc VIEW_KOMPONENTE_UMSATZ'[VM_Firma]);[Total Premium Booked];;DESC)

 

SelectedTopNNumber = MAX('TopN Options'[TopN])

 

Ar = IF([Rank]<=[SelectedTopNNumber];"=>";"") - my analogue of the check measure

 

aVol 2 Premium for TopN = calculate([Total Premium Booked];filter(values('acc VIEW_KOMPONENTE_UMSATZ'[VM_Firma]);if(rankx(all('acc VIEW_KOMPONENTE_UMSATZ'[VM_Firma]);[Total Premium Booked];;DESC)<=[SelectedTopNNumber];[Total Premium Booked];blank())))

 

The last formula is the one I insert in the graph to see the results for TopN (chosen in the Filter) Firms. Still, if I don't choose anything in the Filter, I will get the result for Top 500 firms (as it is the Max number in the Filter), and I need the overall result 😞

Hi @Mastema,

 

There is no need to write a measure like this:

aVol 2 Premium for TopN = calculate([Total Premium Booked];filter(values('acc VIEW_KOMPONENTE_UMSATZ'[VM_Firma]);if(rankx(all('acc VIEW_KOMPONENTE_UMSATZ'[VM_Firma]);[Total Premium Booked];;DESC)<=[SelectedTopNNumber];[Total Premium Booked];blank())))

 

You just need to add measure [Total Premium Booked] into graph. Then, add the [check] measure that I posted above into visual level filter and set its value to 1.

check = IF(ISFILTERED('TopN Options'[TopN]), IF([Rank]<=SelectedTopNNumber,1,0),1)

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-yulgu-msft!

 

Unfortunately doesn't still work as I want it to

Maybe I've complicated the additional formulas I have too much

Will try to resolve the problem myself based on your suggestions

Hi @Mastema,

 

Have you worked it out? If you have resolved it by yourself, would you please kindly share the valid resolution so that it can benefit more users?

 

Regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors