cancel
Showing results for
Did you mean:

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Helper I

## Incorrect Total for NON-DISTINCT values

Hello,

I am creating a visual looking like that:

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
Community Support

``````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.

Helper I

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

Best regards,

Marlene

Announcements

#### Fabric certifications survey

Certification feedback opportunity for the community.

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors