Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Display One or more calculated columns under single column/heading in matrix layout

Hi Community,

I want to display One or more calculated columns under single column/heading in a matrix layout. I can do it easily for non calculated columns by unpivoting in 'Transform data' section, but calculated columns dont appear in transform data section.

Current display:

 

 

 

 

 

Expected display:

 

Many thanks in advance!

 

 

  • Hi Anonymous ,

     

    Try this solution.

    1. Export data (Don't aggregate data)

    2. Unpivot the WaitTime1~5 columns in Edit Query.

    3. Create a calculated column with DAX.

     

    Column = 
    SWITCH(
        [Attribute],
        "WaitTime1", "Stage1",
        "WaitTime2", "Stage1",
        "WaitTime3", "Stage2",
        "WaitTime4", "Stage2",
        "WaitTime5", "Stage3"
    )

     

    4. Create a matrix visual.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

     

6 Replies