cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcUrdang Helper IV
Helper IV

Last month measure versus same month last year measure .. difference & % difference

Hi there .. I am a new PBI user and learning the ropes. Can you advise how to manage the following: link below

 

https://drive.google.com/open?id=19egocOe4BDzkAXOaoX-moUvTzBeaUeug

 

I have a created a number of visuals. Two of them show a measure for last month (4376) and for the same month last year (3870). I created these two cards by just using a filter to get the correct number. However now I would like to show the difference between the two and the % up or down.

 

I know that there might be a few ways to get the answer but looking for the most efficient.

 

Thanks so much,

Marc

12 REPLIES 12
Super User IV
Super User IV

Re: Last month measure versus same month last year measure .. difference & % difference

I think it is better if you create the formulas like these

 

Year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date Filer]))
Last Year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date Filer],-12,MONTH)))

 

 

And then you can calculate change and Change % easily.

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
Thanks.





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


MarcUrdang Helper IV
Helper IV

Re: Last month measure versus same month last year measure .. difference & % difference

Hi .. thanks for the response.

 

However I don't want YTDs ... I need last month and that month last year comparsion .......

 

Any thoughts?

 

thanks

Marc

Super User IV
Super User IV

Re: Last month measure versus same month last year measure .. difference & % difference

You can use the same one as that is MTD. Use End of the month make sure complete month

 

Last Year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date Filer],-12,MONTH))))

Use -1 or -13 as per need.

 





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


MarcUrdang Helper IV
Helper IV

Re: Last month measure versus same month last year measure .. difference & % difference

Hi Amichandak .. I created a card with this calc but the card shows ERROR .. is there anyway you would be able to Skype with me on this ... I am obviously missing something.

 

thanks

Marc

Super User IV
Super User IV

Re: Last month measure versus same month last year measure .. difference & % difference

I created one like this ion the file you shared

 

 

Last Year MTD Sales = CALCULATE(SUM('Consol INBOUND'[TEU]),DATESYTD(dateadd('Consol INBOUND'[FLL ATD ETD],-12,MONTH)))

 

 

Other filter you have to apply. Also please make a date calender and join it with the date. That is the best way to use the date functions

Refer

https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions





Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin


ToffeeMark
Frequent Visitor

Re: Last month measure versus same month last year measure .. difference & % difference

Just did something similar:
 
New Measure:
Current Month Sales = CALCULATE(Sum('Your Sales File'[VALUES]),LASTDATE('Your Sales File'[Date]))
which makes measure = [Current Month Sales]
then, New Measure again:
LY Current Month Sales = CALCULATE([Current Month Sales],SAMEPERIODLASTYEAR('Your Sales File'[Date]))
Let me know if it works for you.
 
ToffeeMark
Frequent Visitor

Re: Last month measure versus same month last year measure .. difference & % difference

Var (Growth) would just be subtracting last years from this year.

% Var (Growth) would be Divide VAR by Last years...e.g. DIVIDE([VAR],[LY Current Month Sales])

 

MarcUrdang Helper IV
Helper IV

Re: Last month measure versus same month last year measure .. difference & % difference

Good evening ...

 

I appreciate your help but the calcs are not doing what I would expect.

 

Can you build them into my workbook so that I can see what you are seeing?

 

that might help .. 

MarcUrdang Helper IV
Helper IV

Last month measure versus same month last year measure .. difference & % difference

ne

Hi there .. I am a new PBI user and learning the ropes. Can you advise how to manage the following: link below

 

https://drive.google.com/open?id=19egocOe4BDzkAXOaoX-moUvTzBeaUeug

 

I have a created a number of visuals. Two of them show a measure for last month (4376) and for the same month last year (3870). I created these two cards by just using a filter to get the correct number. However now I would like to show the difference between the two and the % up or down.

 

I know that there might be a few ways to get the answer but looking for the most efficient.

 

Thanks so much,

Marc

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.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors