cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Narender Resolver I
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
Floriankx Solution Sage
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())
RETURN
CALCULATE(SUM([Amount],
FILTER(Table,
MONTH([Date])=AcutalMonth&&
YEAR([Date])=ActualYEAR&&
OR([Flag]="a",[Flag]="b")
)
)

View solution in original post

2 REPLIES 2
Microsoft Phil_Seamark
Microsoft

Re: Calculate new measure for this month amount

Hi @Narender

 

Can you please provide some sample data


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Highlighted
Floriankx Solution Sage
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())
RETURN
CALCULATE(SUM([Amount],
FILTER(Table,
MONTH([Date])=AcutalMonth&&
YEAR([Date])=ActualYEAR&&
OR([Flag]="a",[Flag]="b")
)
)

View solution in original post

Helpful resources

Announcements
New Ranks Launched March 24th!

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!

‘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

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