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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dobregon
Impactful Individual
Impactful Individual

Measure to change values in subtotal and grand total

Hi guys,

 

I have a type of matrix visual with parent and child, in order to do some drill downs. The problem is that the parent shouldn't have the sum values of their childs (they have their values). I'm looking for a dax measure that can give me the positibility to change the column or other measure where i take the values for the subtotal and total for the matrix table.

something like.. if it is subtotal take this measure, if not, take this one and if it is grand total, take this.

is it possible¿?



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
1 ACCEPTED SOLUTION

thanks @amitchandak i have done a mixure.

 

To create the levels and remove the blanks created in the levels i have used the following link

 

https://www.daxpatterns.com/parent-child-hierarchies/ 

 

This is the most important challenge becase we have 3 types of data

 

- Event parent that should have a child event

- Event child that should have a parent event

- Individual events without parent/children

 

So, the Lv001 will be event parent and individual events

Lv002 will be only childs from parents and for the rest should be Blanks. 

 

Then to remove the blanks i have followed the info in the link with maxdeph, path, etc.

 

To solve the other problem that it is to create a a measure that if it is parent need to read the parent info and if it is child need to reed different column. To do that i have used countrows. if countrows = 1 need to read child info (or individual events) and if controws > 1 need to read parent info.

 

I will close the topic, thanks for help. the idea of the isinscope is really usefull bit in this case we can't use it due to the lv001 have 2 different things (parents and individual events).

 

Regards!



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

thanks @amitchandak i have done a mixure.

 

To create the levels and remove the blanks created in the levels i have used the following link

 

https://www.daxpatterns.com/parent-child-hierarchies/ 

 

This is the most important challenge becase we have 3 types of data

 

- Event parent that should have a child event

- Event child that should have a parent event

- Individual events without parent/children

 

So, the Lv001 will be event parent and individual events

Lv002 will be only childs from parents and for the rest should be Blanks. 

 

Then to remove the blanks i have followed the info in the link with maxdeph, path, etc.

 

To solve the other problem that it is to create a a measure that if it is parent need to read the parent info and if it is child need to reed different column. To do that i have used countrows. if countrows = 1 need to read child info (or individual events) and if controws > 1 need to read parent info.

 

I will close the topic, thanks for help. the idea of the isinscope is really usefull bit in this case we can't use it due to the lv001 have 2 different things (parents and individual events).

 

Regards!



Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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