Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello All, is there any way to create headings as below? Figure 1 is the manually done report. Figure 2 is the power bi report. I wanted to design the headings as the manual report.
Solved! Go to Solution.
Hi @sure19 ,
If all values in matrix value field are measures, as my above reply, we couldn't add measure into matrix column. In Power BI, we couldn't catch column header or measure header directly. Here I suggest you to create a hierachy level with measure name manually.
Then create a measure with all measures you create before.
Measure =
VAR _AssetHealth2021YTD = 1
VAR _AssetHealthTarget = 2
VAR _CBMCoverage2021YTD = 3
VAR _CBMCoverageTarget = 4
RETURN
IF(
MAX('Table'[Level2]) ="2021 YTD",
switch(MAX('Table'[Level1]),"% Asset Health",_AssetHealth2021YTD,"%CBM Coverage",_CBMCoverage2021YTD,BLANK()),
switch(MAX('Table'[Level1]),"% Asset Health",_CBMCoverage2021YTD,"%CBM Coverage",_CBMCoverageTarget,BLANK())
)
Don't forget to relate your measures with QC (matrix row) to get correct result.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Amit, I could not get the related topic using the links you shared.
Hi @sure19 ,
According to your statement, I know your requirement is to build a matrix with hierachy level in matrix column.
This is based on your data model. Are %Asset Health or %Asset Health Target measures or columns? If they are measures, I think you couldn't achieve your goal.
Your data model should be transformed as below, then you can build a matrix as you want.
Table:
Result:
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for the reply Rico, but my data is a calculated measure so as per you, this cannot be used in that case?
Hi @sure19 ,
If all values in matrix value field are measures, as my above reply, we couldn't add measure into matrix column. In Power BI, we couldn't catch column header or measure header directly. Here I suggest you to create a hierachy level with measure name manually.
Then create a measure with all measures you create before.
Measure =
VAR _AssetHealth2021YTD = 1
VAR _AssetHealthTarget = 2
VAR _CBMCoverage2021YTD = 3
VAR _CBMCoverageTarget = 4
RETURN
IF(
MAX('Table'[Level2]) ="2021 YTD",
switch(MAX('Table'[Level1]),"% Asset Health",_AssetHealth2021YTD,"%CBM Coverage",_CBMCoverage2021YTD,BLANK()),
switch(MAX('Table'[Level1]),"% Asset Health",_CBMCoverage2021YTD,"%CBM Coverage",_CBMCoverageTarget,BLANK())
)
Don't forget to relate your measures with QC (matrix row) to get correct result.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@sure19 , I doubt that with standard visual. One way grouping columns (after unpivot)
example
column header grouping
https://www.daxpatterns.com/dynamic-segmentation/
https://community.powerbi.com/t5/Desktop/Matrix-Display-Values-above-Columns/td-p/256905
One more way shown by Curbal in the video, merge report with excel and use the link in power bi service, you can explore that
https://www.youtube.com/watch?v=IISYzTaIyu4
User | Count |
---|---|
93 | |
83 | |
77 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |