Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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:

 MinAverageMax
DTn1_Rst_Bit-30.173
DTn1_RstDCC_Bit-30.173
DTn1_Ret_Bit-30.173

 

or 

looks like this

 DTn1_Rst_BitDTn1_RstDCC_BitDTn1_Ret_Bit
Min-3-3-3
Average0.170.170.17
Max333



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

  • 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:

  • Anonymous's avatar
    Anonymous
    Not applicable

    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?

    • AlexisOlson's avatar
      AlexisOlson
      Icon for Super User rankSuper User

      I just typed the values into the Enter data box

      • Anonymous's avatar
        Anonymous
        Not applicable

        Got it.  Just creating another table.  Nothing super specialized.  I'm over thinking it.   
        Thank You.