Forum Discussion
Organizing Measures in a Table
Hi Everyone.
I have a table with many measures.
For the min, average, max measures, when placed inside of a Matrix visual as values, they show up this way:
I would like to have the min, average and max as columns.
Is there a simple way to rearrage the measures into a sub-group of coumns for min and average and max inside of a Matrix visual?
So, it looks like this:
| Min | Average | Max | |
| DTn1_Rst_Bit | -3 | 0.17 | 3 |
| DTn1_RstDCC_Bit | -3 | 0.17 | 3 |
| DTn1_Ret_Bit | -3 | 0.17 | 3 |
or
looks like this
| DTn1_Rst_Bit | DTn1_RstDCC_Bit | DTn1_Ret_Bit | |
| Min | -3 | -3 | -3 |
| Average | 0.17 | 0.17 | 0.17 |
| Max | 3 | 3 | 3 |
Each measure is an involved calculation, and is not simply taking an aggregate of the value column.
Thank You.
I tried this with field parameters but I couldn't quite get it to work.
The classic approach would be to create a parameter table and a switching function:
VAR _Name = SELECTEDVALUE ( Param[Name] ) VAR _Metric = SELECTEDVALUE ( Param[Metric] ) RETURN SWITCH ( TRUE ( ), _Name = "DTn1_Rst_Bit" && _Metric = "Min", [DTn1_Rst_BitMin], _Name = "DTn1_Rst_Bit" && _Metric = "Ave", [DTn1_Rst_BitAve], _Name = "DTn1_Rst_Bit" && _Metric = "Max", [DTn1_Rst_BitMax], _Name = "DTn1_RstDCC_Bit" && _Metric = "Min", [DTn1_RstDCC_BitMin], _Name = "DTn1_RstDCC_Bit" && _Metric = "Ave", [DTn1_RstDCC_BitAve], _Name = "DTn1_RstDCC_Bit" && _Metric = "Max", [DTn1_RstDCC_BitMax], _Name = "DTn1_Ret_Bit" && _Metric = "Min", [DTn1_Ret_BitMin], _Name = "DTn1_Ret_Bit" && _Metric = "Ave", [DTn1_Ret_BitAve], _Name = "DTn1_Ret_Bit" && _Metric = "Max", [DTn1_Ret_BitMax] )Result:
4 Replies
- AlexisOlsonSuper User
I tried this with field parameters but I couldn't quite get it to work.
The classic approach would be to create a parameter table and a switching function:
VAR _Name = SELECTEDVALUE ( Param[Name] ) VAR _Metric = SELECTEDVALUE ( Param[Metric] ) RETURN SWITCH ( TRUE ( ), _Name = "DTn1_Rst_Bit" && _Metric = "Min", [DTn1_Rst_BitMin], _Name = "DTn1_Rst_Bit" && _Metric = "Ave", [DTn1_Rst_BitAve], _Name = "DTn1_Rst_Bit" && _Metric = "Max", [DTn1_Rst_BitMax], _Name = "DTn1_RstDCC_Bit" && _Metric = "Min", [DTn1_RstDCC_BitMin], _Name = "DTn1_RstDCC_Bit" && _Metric = "Ave", [DTn1_RstDCC_BitAve], _Name = "DTn1_RstDCC_Bit" && _Metric = "Max", [DTn1_RstDCC_BitMax], _Name = "DTn1_Ret_Bit" && _Metric = "Min", [DTn1_Ret_BitMin], _Name = "DTn1_Ret_Bit" && _Metric = "Ave", [DTn1_Ret_BitAve], _Name = "DTn1_Ret_Bit" && _Metric = "Max", [DTn1_Ret_BitMax] )Result:
- roncruiserPost Patron
AlexisOlson
Looks like a solid solution, but I am not familiar with a Parameter Table.
How did you create the Parameter Table in which you created the switching function?
Is it a separate table from which my Min,Ave, Max measures were created?- AlexisOlsonSuper User
I just typed the values into the Enter data box
- roncruiserPost Patron
Got it. Just creating another table. Nothing super specialized. I'm over thinking it.
Thank You.