Forum Discussion
need help formula
- 5 years ago
Here is a measure expression that shows one way to do this. I assume you will use this in a card visual.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Month] ) = thismonth
)
)Regards,
Pat
Here is a measure expression that shows one way to do this. I assume you will use this in a card visual.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Month] ) = thismonth
)
)
Regards,
Pat
@mahoneypat thank you but , in my dable there is no month column, but in your formula seems "MONTH ( TableA [Month] ) " , i am working on a live connect so i can not create column about month
- mahoneypat5 years ago
Microsoft Employee
That was a typo. It is not the Month but the Date column again. No Month column required.
Sum This Month =
VAR thismonth =
MONTH (
TODAY ()
)
RETURN
CALCULATE (
SUM ( TableA[Amount] ),
FILTER (
ALLSELECTED ( TableA[Date] ),
MONTH ( TableA[Date] ) = thismonth
)
)Regards,
Pat