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
Anonymous
Not applicable

Previous Month Cost if dates sales not found

Hi Experts,

 

I need help for getting the previous month cost if the month is not matching.

 

Example

 

Input File  
ItemsMonthCost
ABC5/1/20181304.511
ABC6/1/20181318.111
ABC8/1/20181315.021
ABC9/1/20181315.211
ABC10/1/20181313.211
ABC11/1/20181324.321
ABC2/1/20191293.721
ABC3/1/20191293.521
ABC4/1/20191277.851

 

 

Output   
ItemsMonthCostRS Expected result
ABC1/1/2019 1324.321
ABC7/1/2018 1318.111

 

The question here since I don't have Jan - 2019 and July -2019 sales, it should find what is the latest previous month is available based on that it should give me the result

 

For:-  Jan-19 it's should take from Nov - 18

         Jul-18 it's should take from Jun - 18

 

Let me know if am not very clear 

 

Thanks

Putta

 

4 REPLIES 4
Anonymous
Not applicable

Experts, someone take a look and advise how to achieve the result.

Anonymous
Not applicable

What is this? A measure? A calculated column? If it's a calculated column, why don't you do this in Power Query, where such a calculation truly belongs?

Best
Darek
Anonymous
Not applicable

This is an excel sheet data, I am loading to power BI, I need to know the sales if not available for the current month it should update the previous month

Anonymous
Not applicable

So then, why don't you create a spreadsheet where you've got all the months and calculate the cost for the missing months in there? Would that not be much easier?

If you don't want to do that for some reason, then I'll have to create a loading process in Power Query for you. Can you please share the spreadsheet via a link to OneDrive, Dropbox or Google Drive? I don't want to create it myself as I'm at work right now and busy... Thanks.

Best
Darek

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.

Top Solution Authors