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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
DevMaster
Regular Visitor

Unable to display values in Level2 and Level3 Matrix visual in Power Bi

I am trying to create Level1, Level2 and Level3 matrix visual and unable to display custom calculations in Level2. below is the sample data to construct the visual.

 

Data:

Level1Level2Level3Value
AAAAAA5
AAAAAAA10

 

Matrix Visual: Trying to display as mentioned below in Matrix visual but i am not able to display values in Level2

 

-A 
    --AA50

         ---AAA

5

         ---AAAA

10

 

How can this be handled?

 

Thanks & Best Regards,

AJ

2 ACCEPTED SOLUTIONS

If I understand you correctly and your desired result is : 

Ritaf1983_0-1686794265375.png

You can modify it from the subtotals format with these steps:

Ritaf1983_1-1686794443962.png

I also updated the linked file

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Thanks a lot. it resolves all my issues.

View solution in original post

9 REPLIES 9
Ritaf1983
Super User
Super User

Hi @DevMaster 
Hi the summarized matrix should look like this :

Ritaf1983_0-1686368476853.png

why on your example AA level is 50 if the total sum is 15?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

thanks for your reply.

 

I am calculating average (5/10)*100 from backend and the data will come from SQL database. And i just want display the values only on Level2 & Level3

Hi @DevMaster  again 🙂

I'm still not sure I understand.
But if you just want to show levels 2 and 3 you can achieve it with DAX
According to the hierarchy level, it shows the calculation that you "tell" him

SunValue = if (ISFILTERED('Table'[Level2]),sum('Table'[Value]),if(ISFILTERED('Table'[Level1]),BLANK()))
Ritaf1983_1-1686383445698.png

 


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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

i am trying to calculate the percentage and show the values in Level2. Could you please share .pbix file 

Hi @DevMaster 
If I understand you correctly and your desired result is something like this :

Ritaf1983_0-1686631647914.png



Then you can follow these steps:
1. Add a calculated column for percentage:

Percentage =
 VAR __Current = 'Table'[Value]
  VAR __Previous = MAXX(FILTER('Table','Table'[Level2] = EARLIER('Table'[Level2])),[Level2])

  VAR __PreviousValue = MAXX(FILTER('Table',[Level2]=__Previous),[Value])
RETURN
DIVIDE( __Current,__PreviousValue)

 

Ritaf1983_1-1686631933567.png

2. Create a measure for the matrix:

MatrixValue = if (ISFILTERED('Table'[Level3]),SUM('Table'[Value]),
if(ISFILTERED('Table'[Level2]),format(min('Table'[Percentage]),"00%"),
blank()))

Ritaf1983_2-1686632049062.png

Link to a sample file 


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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thank you for solution. Here i am facing one issue like i don't want to show Total text in the report. if i set subtotals option to off then values not showing. 

 

Could you please suggest that how we need to get rid off row/column subtotals.

If I understand you correctly and your desired result is : 

Ritaf1983_0-1686794265375.png

You can modify it from the subtotals format with these steps:

Ritaf1983_1-1686794443962.png

I also updated the linked file

 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks a lot. it resolves all my issues.

Happy to help, please  consider Accepting  all answers that help with different issues of this post as the solutions to help the other members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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