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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to display measure as sub-columns in matrix visual

I want to display 3 measures under all the columns in a matrix visual.

 

image.png

 

Face amount, Market value are numeric columns in the table. 

ConvexityWTD is a measure.

I want to calculate Prior, current and %change measures based on some condition and display them under each of the column.

 

I am getting the following table by keeping this arrangement:

image.png

image.png

 

How can I get it in the required format?

1 ACCEPTED SOLUTION

The unpivoting option sounds like exactly what you want.  The second option you tried doesn't lead anywhere useful.

 

Set up Attribute (you can rename it) as your column in the matrix visual, and the Values column as your matrix's Values.

 

View solution in original post

3 REPLIES 3
Cmcmahan
Resident Rockstar
Resident Rockstar

How is your data stored in the table right now?  Could you send a screenshot of your columns?

 

The way to set this up if Face Amount, Market Value, ConvexityWtd, and DurationWtd are all separate columns AND Prior, Current, and %change are their own seperate columns is to probably create some sort of hierarchy and drill down a level in the matrix visual.  

 

The better way to solve this would probably be to go back to the data source or your transformations and set it up so that Face Amount, Market Value, etc are text fields in one column with Prior/Current as seperate columns (and %change as a measure!) in the same table.  You can likely do this easily by unpivoting your data, but I would have to see how it's arranged before I could tell you how.  

 

If Face Amount/Market Value are columns of numbers, how do you determine what the value of "Prior" and "Current" should be for a given cell?  Unfortunately, if WtdConvexity is a measure, you can't use it as a column header in a matrix or in a hierarchy except as a child with no children.

If you're trying to create "Prior" and "Current" using date data in your table, you could potentially use those timeframes as Column values in your matrix and rename them, but it would give you a different layout.  Again, seeing a sample of your data table would help tremendously.

Anonymous
Not applicable

The table is arranged in this order:

image.png

I can unpivot Face Amount and Market Value to get a new column called attributes and another column with values.

 

I have also tried another method in which I created another table with the following fields: 

image.png

But I don't know what to do next.

The unpivoting option sounds like exactly what you want.  The second option you tried doesn't lead anywhere useful.

 

Set up Attribute (you can rename it) as your column in the matrix visual, and the Values column as your matrix's Values.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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