cancel
Showing results for
Did you mean:
Resolver I

Calculate new measure for this month amount

Hi All,

I want a dax expression like:

sum(amount) where

month = current month of current year

Flag =a or b

Please guide me to do this in DAX expression.

Narender

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage

Re: Calculate new measure for this month amount

Hello,

Your information is a little rare but sounds like something like this:

`CurrentAmount=VAR ActualMonth=MONTH(TODAY())VAR ActualYear=YEAR(TODAY())RETURNCALCULATE(SUM([Amount], FILTER(Table,  MONTH([Date])=AcutalMonth&&  YEAR([Date])=ActualYEAR&&  OR([Flag]="a",[Flag]="b") ))`
2 REPLIES 2
Microsoft

Re: Calculate new measure for this month amount

Can you please provide some sample data

Proud to be a Datanaut!

Highlighted
Solution Sage

Re: Calculate new measure for this month amount

Hello,

Your information is a little rare but sounds like something like this:

`CurrentAmount=VAR ActualMonth=MONTH(TODAY())VAR ActualYear=YEAR(TODAY())RETURNCALCULATE(SUM([Amount], FILTER(Table,  MONTH([Date])=AcutalMonth&&  YEAR([Date])=ActualYEAR&&  OR([Flag]="a",[Flag]="b") ))`

Announcements

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors