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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
smegha646
New Member

Need help with Matrix report

I have created a matrix report as shown below:

smegha646_0-1715949622330.png
Now I need to add below 2 columns to the above report for the month of April(Latest Month) only. 

smegha646_1-1715949684375.png

However if I add above 2 fields to the 'Values' section, it gets distributed to the months columns and looks like below :

smegha646_2-1715949792087.png
please advise on how i can add the fields to the report so that it shows data next to the latest month column only and not for other months. 

the final output should be something like below :

smegha646_3-1715949953347.png

 


Thanks in advance.

 

 

 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @smegha646 
Unfortunately, we don't have the option to add measures as another column in the matrix.
But there is a workaround with dynamic measure that you can apply to get the desired result.

These are the steps that you can apply :
1. Create a table with the 2 measures that you need to add to the end of the matrix :

Ritaf1983_0-1715962688663.png

2. Append it to the table with the categories that you have on the matrix's columns :

Ritaf1983_2-1715962838084.png

 

Ritaf1983_1-1715962785410.png

Note: the columns' names should be the same :

Ritaf1983_3-1715962903694.pngRitaf1983_4-1715962960657.png

3. at the new table (result of append), remove all columns except for categories :

Ritaf1983_5-1715963102470.png

4. remove duplicates:

Ritaf1983_6-1715963323520.png

5. Switch off the enable load of the "measures table", you don't need it :

Ritaf1983_7-1715963413113.png

6. add an index column, you will need it to sort the columns of the matrix:

Ritaf1983_10-1715963711272.png

 

7. close and apply, and note that the table should be disconnected (with no relationship):

Ritaf1983_8-1715963496284.png

7. create 3 measures :

1 for the "columns" that you have now  and 2 for the new measures 

Ritaf1983_9-1715963571802.png

8. create a dynamic measure for a matrix using our new table as a condition :

Dynamic_measure = SWITCH(SELECTEDVALUE('Measures for matrix'[Category]),
"measure 1",[measure_1],
"measure 2",[measure_2],
[sum])

9. sort the column of categories + measures by index :

Ritaf1983_11-1715963840752.png

10. create the matrix :

Ritaf1983_12-1715963906365.png

The pbix with the example is attached

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @smegha646 
Unfortunately, we don't have the option to add measures as another column in the matrix.
But there is a workaround with dynamic measure that you can apply to get the desired result.

These are the steps that you can apply :
1. Create a table with the 2 measures that you need to add to the end of the matrix :

Ritaf1983_0-1715962688663.png

2. Append it to the table with the categories that you have on the matrix's columns :

Ritaf1983_2-1715962838084.png

 

Ritaf1983_1-1715962785410.png

Note: the columns' names should be the same :

Ritaf1983_3-1715962903694.pngRitaf1983_4-1715962960657.png

3. at the new table (result of append), remove all columns except for categories :

Ritaf1983_5-1715963102470.png

4. remove duplicates:

Ritaf1983_6-1715963323520.png

5. Switch off the enable load of the "measures table", you don't need it :

Ritaf1983_7-1715963413113.png

6. add an index column, you will need it to sort the columns of the matrix:

Ritaf1983_10-1715963711272.png

 

7. close and apply, and note that the table should be disconnected (with no relationship):

Ritaf1983_8-1715963496284.png

7. create 3 measures :

1 for the "columns" that you have now  and 2 for the new measures 

Ritaf1983_9-1715963571802.png

8. create a dynamic measure for a matrix using our new table as a condition :

Dynamic_measure = SWITCH(SELECTEDVALUE('Measures for matrix'[Category]),
"measure 1",[measure_1],
"measure 2",[measure_2],
[sum])

9. sort the column of categories + measures by index :

Ritaf1983_11-1715963840752.png

10. create the matrix :

Ritaf1983_12-1715963906365.png

The pbix with the example is attached

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

 

Thanks a lot, it was of great help 🙂

Happy to help 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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