Forum Discussion

erhan_79's avatar
erhan_79
Icon for Post Prodigy rankPost Prodigy
5 years ago
Solved

need help formula

Hi there ;   i need your small help , i have a table as below i need to calculate with a measure  only sum of the current month amount. for below sample , we are in November so current month is No...
  • mahoneypat's avatar
    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