Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I am trying to replicate this excel version of report into Power BI. However, I am struggling to create a measure that will need to use previous day measure. I attched the demo PBIX file as well. I was hoping to create a var table, Past date using one measure, future date using a different measure and return value based on an if statement. But doesn't look like I can use date in the if statement.
Excel: Expected Result Excel
PBIX: pbix demo
Thanks,
Sophie
Hi, @alotcat ;
Please try it.
Forcast Close Inv TEST =
VAR PAST =
CALCULATE(SUM(Sheet1[Actual Open Inv])+SUM(Sheet1[Target # Delivery])*38 - SUM(Sheet1[Target # Sales])*110)
VAR FUTURE =
CALCULATE([Forcast Close Inv]+SUM(Sheet1[Target # Delivery])*38 - SUM(Sheet1[Target # Sales])*110)
RETURN
IF(MAX([Date])<TODAY(),PAST,FUTURE)
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Thank you for the response. For Forecast Close Inv in the future, the calculation will need to use previous day forecast inv instead. Basically it will need to use the measure result as an input. The expected result is in the attached excel sheet. I have a screenshot below as well.
For example, when I posted the questions it was 4/12, so 4/13 Forecast Close Inv is 4/12 Forecast Clost Inv + Target Delivery * 38 - Target # Sales * 110
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
7 |
User | Count |
---|---|
13 | |
12 | |
11 | |
11 | |
8 |