Forum Discussion
VALUES function with HASONEVALUE and SUMX iterator function
----------------------------------------------------------------------------------
Iterator version = correct when multiple values exist, because it loops through each row and applies the right logic.
Simple version = works only when the filter context guarantees one country at a time. If multiple exist, it miscalculates.
In sales commission iterator, SUMX iterates through each region, evaluates [Revenue] * 0.1, then sums up.
In sales commission, you’re multiplying the total [Revenue] in context by 0.1.
Rule of thumb:
Use simple measure if your business rule applies a single rate per filter context.
Use iterator (SUMX) when you need row-by-row logic, e.g., different commission rates for different countries/products.
2 Replies
- FBergamaschiSuper User
This is a blog for asking for support, if you want to explain DAX you can consider other blogs
- v-sdhruvCommunity Support
Hi Sania-F ,
Thank you for sharing this. This kind of post is incredibly valuable to the community. Consider turning this into a blog post so others can benefit from your experience more easily
Power BI Community Blog - Microsoft Fabric Community