Forum Discussion
omelo
4 years agoHelper III
DAX sum amount
Hi All, I need help with a sum, I have no idea what function or expression will give me the expected results. The data structure is like this: I need to show the sum of Amount by create_d...
- Anonymous4 years ago
Hi omelo ,
Here are the steps you can follow:
1. Create calculated column.
Month = MONTH('Table'[Create_date])Count = COUNTX(FILTER(ALL('Table'),'Table'[Project]=EARLIER('Table'[Project])),[Project])Flag = IF( [Count]>1 && ISBLANK('Table'[Phase]),0,1)2. Create measure.
Measure = CALCULATE( SUM('Table'[Amount]), FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[Flag]=1))3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Anonymous
4 years agoNot applicable
Hi omelo ,
Here are the steps you can follow:
1. Create calculated column.
Month = MONTH('Table'[Create_date])Count = COUNTX(FILTER(ALL('Table'),'Table'[Project]=EARLIER('Table'[Project])),[Project])Flag =
IF(
[Count]>1 && ISBLANK('Table'[Phase]),0,1)
2. Create measure.
Measure =
CALCULATE(
SUM('Table'[Amount]),
FILTER(ALL('Table'),'Table'[Month]=MAX('Table'[Month])&&'Table'[Flag]=1))
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
omelo
4 years agoHelper III
Hi Liu,
I can't thank you enought for all your help!
This is giving me the necesary logic to tweak it a little bit and make it work with the data hierarchy on my table.
Thank you again for your response. 👍👍👍👍👍👍