Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello. I have a DAX formula to calculate sales from the previous day:
Sales yesterday = CALCULATE(sum([Sales]),PREVIOUSDAY([Date]))
The function works well, however when there is no sales for a particular day, I won't see the sales amount from the previous day (see in yellow)
How can I fix this?
Thank you
Thank you for the quick response, but it only added zeros...
Take Previous Day on time table
PriorDay Sales = CALCULATE(SUM(Sales[Sales_amount]),PREVIOUSDAY(Curr_Date[Sales_date]))
In my case Curr_date is marked as time table in power BI
Some even dates are missing
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 128 | |
| 88 | |
| 79 | |
| 67 | |
| 62 |