Forum Discussion
Anonymous
5 years agoNot applicable
Calculate Amount For Each Month
Hello Community , I have a table of Invoice transaction . I want to calculate the amount of transaction By MonthYear for each Client Source Data : Client|Amount|Date ...
- 5 years ago
Hi, Anonymous
According to your description ,I think you can create a yearmonth column and a measure,then use it in table.
Like this:
YM = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]),1)Measure = SUMX ( SUMMARIZE ( 'Table', [Client], [YM], "a", SUMX ( FILTER ( ALL ( 'Table' ), [Client] = SELECTEDVALUE ( 'Table'[Client] ) && [YM] = SELECTEDVALUE ( 'Table'[YM] ) ), [Amount] ) ), [a] )If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-janeyg-msft
5 years agoCommunity Support
Hi, Anonymous
According to your description ,I think you can create a yearmonth column and a measure,then use it in table.
Like this:
YM = DATE(YEAR('Table'[Date]),MONTH('Table'[Date]),1)Measure =
SUMX (
SUMMARIZE (
'Table',
[Client],
[YM],
"a",
SUMX (
FILTER (
ALL ( 'Table' ),
[Client] = SELECTEDVALUE ( 'Table'[Client] )
&& [YM] = SELECTEDVALUE ( 'Table'[YM] )
),
[Amount]
)
),
[a]
)If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.