Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dcrios
Frequent Visitor

Previous Month with problems

Hello everybody,

 

I faced many times people trying to bring values from the previous month. But in my case, I was trying to bring de last date from previous month, like the formula in this link

https://community.powerbi.com/t5/Desktop/Last-date-Previous-Month/m-p/304830

But when I try this formula to get this value, didn't work as well when I put the measure in a Column chart. It must be appear the value from the date 30-11-2017 (9.057.180.489.18). Can anyone please help me with this?

 

 

power bi.png

 

1 ACCEPTED SOLUTION

Oh ty @Ashish_Mathur I already did what I need. I created a filter to the current and the previous month and putted on the sheet. So in the measure, I created a DAX calculation with calculate(sum(measure), lastdate(date)) and it worked fine for me. But thanks for replying this question. Have a great day

View solution in original post

9 REPLIES 9
rocky09
Solution Sage
Solution Sage

did you have any page leve/report level filters applied?

No, it doesn't. I just created in a new Dashboard to test this formula

can you post sample data

vlr_liquidoData Foto
905723602412/1/2017 
905722209511/29/2017
905718048911/30/2017

Capture.PNG

 

 

is this what you are trying?

No. I tried to explain that I want to show the last date from previous month, like in the formula I posted in the first post. So if I got 01-12-2017 as my current date in the database and all dates from november, I want to show the value of 30 nov 2017 because Its the last date from previous month. 

Hi,

 

So if the last date in your Data Table is March 10, 2018, then do you want to see a single column in the column chart with the value from Feb 28, 2018?  If the answer is yes, then what result would you expect if in your Data Table, there is no data at all for Feb 28, 2018?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Oh ty @Ashish_Mathur I already did what I need. I created a filter to the current and the previous month and putted on the sheet. So in the measure, I created a DAX calculation with calculate(sum(measure), lastdate(date)) and it worked fine for me. But thanks for replying this question. Have a great day

@dcrios,

 

Glad to hear that. You may help accept solution. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.