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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
MarlenePirker
Helper I
Helper I

Incorrect Total for NON-DISTINCT values

Hello, 

 

I am creating a visual looking like that: 

MarlenePirker_0-1677679090441.png

I am showing the delivery in comparison to the order. The yellow column is a measure. 

SKU Del. QTY cut = IFERROR(
    IF(SUM(Fact1_Delivered[Total Del. QTY])>SUM(Fact2_Allocation[Allocation QTY]), SUM(Fact2_Allocation[Allocation QTY]),SUM(Fact1_Delivered[Total Del. QTY])),
    BLANK()
    )
 
The total value from SKU QTY is not calculated correctly. I know this issue and I had this before. I always solved this, using another measure like that: 
SKU QTY = IF(HASONEVALUE('Article Bridge'[Article Number]),[SKU Del. QTY cut], SUMX(Values('Article Bridge'[Article Number]), [SKU Del. QTY cut]))
 
The problem is that this measure apparently ONLY works for unique values but as you can see the articles numbers can appear more than once in different weeks - so it doesnt work. 
 
Can someone help me how to solve this? 
 
Thank you! 
 
best regards, 
Marlene

 

2 REPLIES 2
v-tangjie-msft
Community Support
Community Support

Hi @MarlenePirker ,

 

Please try this measure:

Measure = 
SUMX(    
SUMMARIZE(   
'Article Bridge',   
'Article Bridge'[Article Number]   ,         
"total",[SKU Del. QTY cut]    ),    
[total])

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Unfortunately this doesnt work... For the SKU QTY I get 40.204 but it should be 10700. When I filter for only one Week and look at the articles (cause they are unique now) it works. But as soon as I have my overview containing all weeks (2023.01-2023.09) and the articles are not unique anymore the total value is not correct anymore.. I dont really have time to create a new small dataset, I hope that the issue is clear.. 

MarlenePirker_0-1677743849895.png

Thank you so much for your reply!

Best regards, 

Marlene

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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