Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sure19
Helper II
Helper II

visual table heading

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.

Figure 1 - Manual ReportFigure 1 - Manual ReportFigure 2 - Power BI VisualizationFigure 2 - Power BI Visualization

1 ACCEPTED 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.

1.png

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.

1.png

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.

View solution in original post

5 REPLIES 5
sure19
Helper II
Helper II

Hi Amit, I could not get the related topic using the links you shared.

v-rzhou-msft
Community Support
Community Support

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:

1.png

Result:

2.png

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.

1.png

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.

1.png

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.

amitchandak
Super User
Super User

@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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.