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.
Hello all,
I wanted to make custom sort dropdown for asc and desc options for my tabular visualization.
I am able to sort using Ascending/Descending when I am having unique values but my detailed report has same values repeated multiple time for different dates.
My meausre
Solved! Go to Solution.
@lbendlin Thanks for your contribution on this thread.
Hi @Jn_01 ,
You can refer the following official documentation to sort the data of single or multiple fields in the visual directly just as @lbendlin referred:
Change how a chart is sorted in a report - Power BI | Microsoft Learn
In addition, please update the formula of your measure as below and check if it can return the expected result...
rankmeasure =
VAR SummaryTable =
SUMMARIZE(
'SortOrder',
'SortOrder'[api_for],
"MinOrder", CALCULATE(MIN('SortOrder'[Order]))
)
RETURN
IF(
SELECTEDVALUE(SortTable[SortOrder]) = "1",
RANKX(ALLSELECTED(SummaryTable), [MinOrder], , ASC, Dense),
RANKX(ALLSELECTED(SummaryTable), [MinOrder], , DESC, Dense)
)
Best Regards
@lbendlin Thanks for your contribution on this thread.
Hi @Jn_01 ,
You can refer the following official documentation to sort the data of single or multiple fields in the visual directly just as @lbendlin referred:
Change how a chart is sorted in a report - Power BI | Microsoft Learn
In addition, please update the formula of your measure as below and check if it can return the expected result...
rankmeasure =
VAR SummaryTable =
SUMMARIZE(
'SortOrder',
'SortOrder'[api_for],
"MinOrder", CALCULATE(MIN('SortOrder'[Order]))
)
RETURN
IF(
SELECTEDVALUE(SortTable[SortOrder]) = "1",
RANKX(ALLSELECTED(SummaryTable), [MinOrder], , ASC, Dense),
RANKX(ALLSELECTED(SummaryTable), [MinOrder], , DESC, Dense)
)
Best Regards
What prevents you from using the default sort options (clicking on the column headers) ?