Forum Discussion
matriz
- 2 months ago
Hi cmarino
If July and August are coming from a column containing month names, you can't sort them individually in a matrix visual. Sorting is only possible at the total column or based on the row headers. Sorting by a column is only possible when July, August, etc. are individual measures. That said, in your case, the total column must return the Aug value.
Please see the attached pbix.
Hi cmarino,
What you're seeing is expected behavior in a Matrix. When you sort by a value column, Power BI sorts the entire row set based on the selected measure, but it doesn't allow you to independently sort one month column while keeping the others unchanged.
If your goal is to sort the regions by the values in August, one workaround is to create a measure that always returns the August value and use that as the sort measure.
For example:
August Sales = CALCULATE(SUM(Table[Sales]), Calendar[Month] = "Aug")
Add the measure temporarily to the Matrix, sort by it, and then remove it if you don't want it displayed.
Another option is to create a ranking measure based on the selected month and use that for sorting. This works particularly well if the month displayed changes dynamically.
If the Matrix only contains Jul and Aug, clicking the Aug header should normally sort by the Aug values. If it keeps sorting by Jul instead, can you confirm whether Jul and Aug are coming from a Month field in your Calendar table or if they are separate measures? That would help determine whether this is a Matrix limitation or something specific to the model.