cancel
Showing results for
Did you mean:  Helper III

## Year To Date with already past month

Hi everybody,

I'm just looking for a way to show my month revenue with 2 measures :
1) Month Revenue

2) YTD Revenue

And this, only on the month already past. Example : for today, only the 5 first month of the year.

How can I do that?

1 ACCEPTED SOLUTION  Community Support

Hi, @SANTEK

According to your description, I can clearly understand your requirement, I think you can try these two measures to achieve this:

This is the test data I created based on your requirement: ``````Month Revenue =

CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),MONTH([Date])=MONTH(TODAY())&&[Date]<=TODAY()))``````
``````YTD Revenue =

CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()))
``````

Then create two card charts and place them like this: And you can get what you want.

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2  Community Support

Hi, @SANTEK

According to your description, I can clearly understand your requirement, I think you can try these two measures to achieve this:

This is the test data I created based on your requirement: ``````Month Revenue =

CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),MONTH([Date])=MONTH(TODAY())&&[Date]<=TODAY()))``````
``````YTD Revenue =

CALCULATE(SUM('Table'[Amount]),FILTER(ALL('Table'),YEAR([Date])=YEAR(TODAY())&&[Date]<=TODAY()))
``````

Then create two card charts and place them like this: And you can get what you want.

Thank you very much!

Best Regards,

Community Support Team _Robert Qin

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  Super User

@SANTEK , YTD based on today

measure =
var _max = today()
var _min = date(year(_max),1,1)
return
calculate(sum(Table[Value]), filter('Date', Date[Date] >=_min && Date[Date] <=_max))

measure =
var _max = today()
var _min = date(year(_max),1,1)
return
calculate(sum(Table[Value]), filter(all('Date'), Date[Date] >=_min && Date[Date] <=_max))

Also refer All About Time Intelligence around Today: https://youtu.be/gcLhhxhXKEI  