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
Anonymous
Not applicable

Measure totals in matrix with hierarchy

Hi all,

 

I've got such a matrix.

Rows: Channel, Customer, Segment; Columns: Year-Period; Values: MyMeasure = IF(Table[Amount]<0;0;Table[Amount]).
Surely, PBI calculates totals not as I expect it. As you can see the sum of Segments doesn't equal Customer's subtotals.

 

 2019-P092019-P10
Channel-17075
 Customer-15045
  Segment-11010
  Segment-22010
  Segment-33030
  Segment-400
 Customer-22030
  Segment-11015
  Segment-200
  Segment-32020

 

I tried this measure: SUMX(FILTER(VALUES(Table[Segment]);Table[Amount]>0);Table[Amount])+0

Now I have correct subtotals at the level of Customer, but at the Channel level of hierarchy subtotals are still incorrect.

 

 2019-P092019-P10
Channel-17075
 Customer-16050
  Segment-11010
  Segment-22010
  Segment-33030
  Segment-400
 Customer-23035
  Segment-11015
  Segment-200
  Segment-32020

 

Please, help me to write the correct DAX for this matrix.

0 REPLIES 0

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.

Top Solution Authors