Forum Discussion
DylanSandry
2 years agoFrequent Visitor
Grouping matrix columns using custom measures
Hello, I've been destroying myself trying to figure this out and I wonder if someone can help. I have the following table (Simplified to get to the root of my problem): Job Product Price ...
Daniel29195
Community Champion
2 years agodo the following :
create a custom table : ( No need for the Column "Column")
add column1 to the matrix.
and now you just need to create 2 measures :
| TotalPrice |
TotalCount
for each measure, use the switch statement :
switch(
switch(
true ( ),
selectedvalue(table[column1]) = "Today" , calculate( [total price] , date = today () ,
selectedvalue(table[column1]) = "This Month" , calculate( [total price] , year(sales[order date]) = year ( today() , month(sales[order date]) = month( today()) ,
.........., ,
let me know if this helps.