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.
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
try
Sales yesterday = CALCULATE(sum([Sales]),PREVIOUSDAY([Date]))+0
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |