Forum Discussion
How in @DAX summarize or Group by Distinct Value
Hi,
I would like to Calculate payments where the ID has Code =U007 and throw out other IDs, Then sum all when Flag <> 0.
Please see the below picture for the final result.
LINK TO : SAMPLE DATA
Thanks!
4 Replies
- TomMartens
Super User
Hey NilR ,
please create a PBIX file that contains sample data but still reflects your data model, upload the pbix file to onedrive or dropbox and share the link.
This helps to avoid recreating tables with matching table and column names.
Regards,
Tom
- NilR
Post Patron
TomMartens I added sample data. Thank you for your help in advance!
- nvprasad
Solution Sage
Hi,
You can create measure using main table for this without creating any additional tables.
DAX:
CALCULATE(SUM(MAIN TABLE[PAYMENT]),FILTER(MAIN TABLE, FLAG <> 0 && CODE=U007)
Appreciate a Kudos! ๐
If this helps and resolves the issue, please mark it as a Solution! ๐Regards,
N V Durga Prasad - v-henryk-mstf
Community Support
Hi NilR ,
Sorry, I canโt access this link. Can you change the way of sharing files? I will answer for you as soon as possible.
Looking forward to your reply.
Best Regards,
Henry