Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Problem: Table needs to be sorted 'descending' for column "3/30/21". Value is a Dax Measure and latest date changes each week.
Can't seem to find how to do this in visual or through PQ
Solved! Go to Solution.
Hi @kiddknee ,
Please try the following formula:
Rank =
IF (
MAX ( 'Table'[Date] ) = MAXX ( ALL ( 'Table' ), [Date] ),
RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[Date] = MAX ( 'Table'[Date] ) ),
CALCULATE ( [Your Measure] ),
,
ASC,
DENSE
),
0
)
Sort =
IF (
HASONEVALUE ( 'Table'[Date] ) = FALSE (),
MAXX (
FILTER ( 'Table', 'Table'[Agent Name] = MAX ( 'Table'[Agent Name] ) ),
[Rank]
)
)
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @kiddknee ,
Please try the following formula:
Rank =
IF (
MAX ( 'Table'[Date] ) = MAXX ( ALL ( 'Table' ), [Date] ),
RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[Date] = MAX ( 'Table'[Date] ) ),
CALCULATE ( [Your Measure] ),
,
ASC,
DENSE
),
0
)
Sort =
IF (
HASONEVALUE ( 'Table'[Date] ) = FALSE (),
MAXX (
FILTER ( 'Table', 'Table'[Agent Name] = MAX ( 'Table'[Agent Name] ) ),
[Rank]
)
)
The final output is shown below:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @kiddknee ,
you can choose in the settings of the visual if you want to sort by a specific column and if you want to sort ascending or descending:
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
117 | |
84 | |
49 | |
38 | |
28 |
User | Count |
---|---|
185 | |
73 | |
73 | |
50 | |
42 |