The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a requirement to create a table visual similar to below. My end users are requesting that the visual replicates the Excel version they are currently using.
My challenge is that I haven't found a way to add the headers as in the image below. I could use text boxes, but my table is going to have many columns and will end up with a horizantal scroll and the text boxes remain static and will end up misaligned when the user scrolls.
Is there any solution for adding headers like below?
Solved! Go to Solution.
Hi @ERing
That isn't possible with tables since nested headers aren't supported. A matrix can be used, but it won't work out of the box. A disconnected table is required to store measure names, categories, sorting, and format strings. If rank is also a measure, it will need a corresponding entry. Additionally, matrix rows can only be sorted by the total column or row categories, not by individual values of a column added to the column titles, so rank must be returned as the column total.
Attached is a sample file based on your pbix in a separate post.
Hi @ERing ,
I wanted to check in on your situation regarding the issue. Have you resolved it? If you have, please consider marking the reply that helped you or sharing your solution. It would be greatly appreciated by others in the community who may have the same question.
Thank you.
Hi @ERing
That isn't possible with tables since nested headers aren't supported. A matrix can be used, but it won't work out of the box. A disconnected table is required to store measure names, categories, sorting, and format strings. If rank is also a measure, it will need a corresponding entry. Additionally, matrix rows can only be sorted by the total column or row categories, not by individual values of a column added to the column titles, so rank must be returned as the column total.
Attached is a sample file based on your pbix in a separate post.
Hi @danextian Thanks for the help!
I have a few additional questions.
First, i realized my sample data wasn't modeled correctly. I've attaced an updated version with a model that is similar to my real data. There is a Mapping_Table (Channel_ID, Category, Channel, Channel_Rank) that is connected to my Fact_Table on Channel_ID.
Questions:
1. I assume having the Mapping_Table means I need to add additional columns for Channel and Category to the disconnected Headers table to make the headers work? I don't actually want to display Rank (I just want to use it to sort my Channel column).
2. What is the purpose the the Web Sessions Rank measure you used originally and why did you use Web_Clicks_Baseline in that measure? Could any measure be used in it's place?
3. How do I format Revenue and Post_Sales_Revenue in the Format String column on the disconnected Header table?
I whipped it up for the sake of illustration.
For format string, search for dynamic format strings in Power BI.
For the rank, it is because your data appears to be sorted by rank and matrix rows are sorted based on the total column thus this rank needs to be returned as the total ( you could use any other measure to sort it by).
@danextian So regarding question 2 from above, I can use any measure in the Rank measure?
Hi @ERing ,
Thank you @danextian for the helpful responses!
Yes, you can use any measure instead of the original Web Sessions Rank measure, as long as it helps sort your Channel column the way you need. The purpose of this measure is simply to control the sorting of the matrix rows since Power BI sorts them based on the total column.
If this helps,consider accepting the answer that helped you as accept as solution.
Thank you for beina a part of Microsoft Fabric Community Forum!
Regards,
Palllavi.