Forum Discussion
afaro
1 year agoHelper III
Can I sort matrix visual based off a specific column?
Let's say I have table like this: Country C1 C2 C3 Product Sales Sales Sales P1 10 20 50 P2 30 10 60 P3 50 0 10 Product is the rows in the matrix, Country is...
- 1 year ago
I showed that in my measure, with ISINSCOPE.
lbendlin
1 year agoSuper User
Yes, change the column total to only include C2.
Measure = if(ISINSCOPE('Table'[Country]),sum('Table'[Sales]),CALCULATE(sum('Table'[Sales]),'Table'[Country]="C2"))
Sort by the column total.
Hide the column total.
afaro
1 year agoHelper III
I want to have the option to change by any country whenever I want instead of keeping static just for C2. So, if I want to do by C1 and C3, then end user should be able to do that.
To add, I don't want to create a measure where I remove the columns from matrix and explicitly add the country in the measure for example CALCULATE([Sales], Country = "C2") and so on. This is a solution but not something I am looking for since I prefer having to keep the columns.
- lbendlin1 year agoSuper User
Sure, have a disconnected slicer for the country selection and in the measure read the current slicer value.