Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Say I have slicer that is using values from 1-15 in steps of 5, these values are being used to make a TOPN measurement, I have, dynamic, as seen in the SELECTEDVALUE function below.
TopCustomer = VAR PickFromSlicer = SELECTEDVALUE('TOPN Selection'[TOPN Value]) RETURN SUMX( TOPN( PickFromSlicer, FILTER(ADDCOLUMNS( VALUES(YourTable[Customer]), "Total",CALCULATE(COUNTROWS(YourTable)), "Rank", RANKX(ALL(YourTable[Customer]),CALCULATE(COUNT(YourTable[Customer]))) ),[Rank] <= PickFromSlicer),[Total],DESC),[Total] )
I want my slicer selections to be text as listed in the below table, but I still need the numeric value to be used in my TOPN measurement.
TOPN Value | Text to be shown in Slicer |
5 | Very Narrow View |
10 | Narrow View |
15 | All |
Has any one done something like this before? Is it possible?
Solved! Go to Solution.
After some expierimenting, I figured it out! By adding the "Slicer Text" Column to my slicer table, by right clicking on it and clicking "Edit Query" in the drop down, making my changes(adding the column) and then pressing "Close and Apply," a feild with my new column name appeared in the Feilds Pane. I then clicked on my slicer, and unchecked the "TopN Value" feild(under my slicer table) and then checked the "Slicer Text" feild. I am newer to Powerbi, so this was not obvius to me. I hope this discription helps someone in the future.
After some expierimenting, I figured it out! By adding the "Slicer Text" Column to my slicer table, by right clicking on it and clicking "Edit Query" in the drop down, making my changes(adding the column) and then pressing "Close and Apply," a feild with my new column name appeared in the Feilds Pane. I then clicked on my slicer, and unchecked the "TopN Value" feild(under my slicer table) and then checked the "Slicer Text" feild. I am newer to Powerbi, so this was not obvius to me. I hope this discription helps someone in the future.