Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hi guys, I'm having an issue when I try to sort by values in a Matrix when I have a formatted measure as values.
You can see in image above that I have $84.0k after $108.4k and everything is messed up because the resulting String type of measure
Measure definition is like this
Metric Selected (Formatted) =
IF( ISFILTERED('Metrics'[Slicer]),
SWITCH(LASTNONBLANK('Metrics'[Slicer], ""),
"KPI 1", FORMAT([KPI 1 Value], "#,##0"),
"KPI 2", FORMAT([KPI 2 Value], "#,##0.0%")
),
FORMAT([KPI 1 Value], "#,##0")
)That means that each KPI has its own formatting style so I can't have format options selected on Modeling tab of menu.
I have an unformatted version of measure and that's the one I use in charts but since measures are not sortable by other measures (like columns are) I'm clueless on what to do.
Do you know if there's a way to properly sort values with this setup?
A workaround is to create a rank measure
Measure len = LEN([Metric Selected (Formatted)])
Measure rank = RANKX (
ALL ( 'Table1' ),
RANKX ( ALL ( Table1 ), [Measure len],, ASC )
+ DIVIDE (
RANKX ( ALL ( Table1 ), [Metric Selected (Formatted)],, ASC ),
COUNTROWS ( ALL ( Table1 ) ) + 1
),,ASC,Dense)
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your reply Maggie, an additional issue in my case is that is not a 2 column table but a n time periods based matrix so I have 18 columns for months and then I'm displaying values for selected kpi.
So I don't get to hide the additional measure by resizing column width to 0
Since ther are many months, which Formatted Values do you want to sort by?
Formatted Values of Month1? month 2? sum value for all months?
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Maggie,
I'm not looking for a particular order by month, actually if you put a Top N (5 for example) filter in Matrix using unformatted measure, you'll get Top 5 based on first month available from left to right.
That behaviour will be acceptable in this case I have but if is there any way to pick a particular month for sorting it will be useful as well.
Thanks
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 34 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 74 | |
| 71 | |
| 37 | |
| 35 | |
| 25 |