Requesting you, please guide me on how I can achieve the logic in Power BI
I have sales data where there are three columns.
1st column is Month, which has the data type as a date.
2nd column is Sales, which is nothing, but Sales happened.
3rd column is Target, which is nothing, but Target decided.
I have written the logic in the attached Excel for which I am looking for the solution. And also pasted the screenshot of it here
I want this logic to implement in Power BI, where I have imported the attached Excel as source data.
PFA Excel & PBIX File Sales Data.pbix (486.5 KB) Sales Data.xlsx (13.5 KB)
How can we achieve it?? In Power Query by creating Looping Function or In DAX or In Calculated Column??
Sales Data.xlsx (22.4 KB)
I had a play around in power query, its pretty complex logic and a lot going on, I added the table of my results to the right, what results are you expecting? It would be interesting to see if they matched with the expected results.
I also changed March to 18000 as your example to check that single result.
I applied the solution provided by @kylie.oconnell , And it worked perfectly with the condition which I was expecting.
I was waiting for the User to test with their data and that is why got delay in replying.
Thank you so much @kylie.oconnell for the perfect solution!!!