Forum Discussion
Anonymous
4 years agoNot applicable
Help With IF Sum
Hi, I am trying to recreate the following calculation into a DAX Measure. Please can someone advice how ths is possible:- if {Job_Mth}<={Current Month (Year Month YYYY-MMM Selection from...
v-kkf-msft
4 years agoCommunity Support
Hi Anonymous ,
I am not sure if I understood your question correctly. If you use this formula,
IF_Measure =
IF (
MAX ( 'Table'[ProjMth] ) <= EOMONTH ( TODAY (), 0 ),
SUM ( 'Table'[ProjDollars] ),
SUM ( 'Table'[ContractAmt] )
)
because 12/1/2050 > 4/30/2022, then return SUM ( 'Table'[ContractAmt] ), i.e. 12182946.
If you want to calculate the sum of column [ProjDollars] less than or equal to the current month, please try:
less_equal_currentperiod =
CALCULATE (
SUM ( 'Table'[ProjDollars] ),
FILTER ( 'Table', 'Table'[ProjMth] <= EOMONTH ( TODAY (), 0 ) )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.