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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
DieLem
Helper II
Helper II

Different data levels in one row

Good Day,

I have data like this:

 

LevelData.PNG

 

I want to create a Matrix that shows the sum of the value. Formula: 

Total Value = sum(Sheet1[Value])

My requirement is to have values from two diffent levels in the same row. Thus summing the Level1 - Colour, and only one of the Level2 - Square. As such:

 

LevelResult.PNG

But I can't get the formatting right. All I can get is this:

 

Level.PNG

Can you please assist?

Thanks!

1 ACCEPTED SOLUTION
prateekraina
Memorable Member
Memorable Member

Hi @DieLem,

 

Please refer this pbix file.
Hope this solves your problem. Let me know if you want any explanation.

 

Prateek raina

View solution in original post

5 REPLIES 5
prateekraina
Memorable Member
Memorable Member

Hi @DieLem,

 

Please refer this pbix file.
Hope this solves your problem. Let me know if you want any explanation.

 

Prateek raina

Thanks @prateekraina,

I understand the logic. 

Next up I just have to create the custom table with queries and logic on my side.

Thanks so much!

Hi @DieLem,

 

Glad to know that it solved your problem. 
It would be appreciated if you could hit thumbs up for my answer 🙂

 

Prateek Raina

Stachu
Community Champion
Community Champion

try this

Total Value =
VAR ProperFilter =
    FILTER ( Sheet1, Sheet1[Level1] <> "Shape" || Sheet1[Level2] = "Square" )
RETURN
    CALCULATE ( SUM ( Sheet1[Value] ), ProperFilter )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

Hey @Stachu,

Thanks for the feedback. Your solution returns the correct value. 

However that is not my main issue. How do I use the "Matrix" / "Table" visualisation to have Colour and Circle as the only two entries, directly underneath each other?

Thanks!

Helpful resources

Announcements
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!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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