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
mar100
Frequent Visitor

Sum up data avoiding double counting

Hi guys!

 

I've got the following data table.

 

snip.JPGsnip.JPG

 

I need to create a measure to calculate the total number of households.  

 

The number of households changes only on Regional and Demographical levels. In the picture above, we can see Demo Group - 1 and two regions - West and South. Power BI, however, sums it up at every level, i.e. total is 60. 

 

I would greatly appreciate any help on this!!

Thank you!

 
 
1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @mar100 

This measure should get you what you are looking for.  I tested it with an additional demo split add to check.  You will just have to change thename of your table.

Measure = 
SUMX ( 
    SUMMARIZE( Data, Data[Region], Data[Demo Split] ),
    CALCULATE ( MAX ( Data[Number of households] ) )
)

DemoSplit.jpg 

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @mar100 

This measure should get you what you are looking for.  I tested it with an additional demo split add to check.  You will just have to change thename of your table.

Measure = 
SUMX ( 
    SUMMARIZE( Data, Data[Region], Data[Demo Split] ),
    CALCULATE ( MAX ( Data[Number of households] ) )
)

DemoSplit.jpg 

 

If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

Thank you so much!! You are a life saviour! 🙂

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.