The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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) ?
User | Count |
---|---|
16 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
8 | |
8 |