Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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!
Solved! Go to Solution.
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.
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.
@Anonymous - If I understand this correctly, you could do this with a custom matrix hierarchy: https://community.powerbi.com/t5/Quick-Measures-Gallery/The-New-Hotness-Custom-Matrix-Hierarchy/m-p/963588#M428
@Anonymous , first Unpivot and then create stage on as new calculated column
https://radacad.com/pivot-and-unpivot-with-power-bi
Transpose : https://yodalearning.com/tutorials/power-query-helps-transposing-data/
New Column = Switch(True() ,
[waittime] in {"waittime1","waittime2"} , "Stage1",
[waittime] in {"waittime3","waittime4"} , "Stage2",
"Stage3"
)
Display in matrix with two columns waittime and stage
@amitchandak how can I unpivot calculated columns? They dont appear in transform data section.
Hi @Anonymous ,
Do you mind sharing your .pbix file?
Or show the sample data of the fact table and the formulas of the calculated columns. The information is necessary for us.
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.
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |