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
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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.