cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
SANTEK
Helper III
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?

 

Thanks for your help

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
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:

v-robertq-msft_0-1622102601936.png

 

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:

v-robertq-msft_1-1622102601942.png

 

And you can get what you want.

You can download my test pbix file below

 

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.

View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
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:

v-robertq-msft_0-1622102601936.png

 

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:

v-robertq-msft_1-1622102601942.png

 

And you can get what you want.

You can download my test pbix file below

 

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.

View solution in original post

amitchandak
Super User
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 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!