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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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

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?

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

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

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

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.