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 All,
I need to compute yesterday with all the DateTime values but when I use the below-calculated column it returns just one value. I need all the date time values from yesterday.
Yesterday = IF('DATE'[Date] = (DATE(YEAR(NOW()), MONTH(NOW()), DAY(NOW()-1))), 1 , 0)
Please help.
Solved! Go to Solution.
hi, @Kolumam
For the data type is datetime, so try this formula:
New Yesterday = IF(DATE(YEAR('DATE'[Date]), MONTH('Date'[Date]), DAY('Date'[Date]))= (DATE(YEAR(NOW()), MONTH(NOW()), DAY(NOW()-1))), 1 , 0)
Result:
Best Regards,
Lin
hi, @Kolumam
For the data type is datetime, so try this formula:
New Yesterday = IF(DATE(YEAR('DATE'[Date]), MONTH('Date'[Date]), DAY('Date'[Date]))= (DATE(YEAR(NOW()), MONTH(NOW()), DAY(NOW()-1))), 1 , 0)
Result:
Best Regards,
Lin
Hi @Kolumam ,
This is a way to do what you want, but as @MattAllington said it might not be the best approach to your problem :
Yesterday = IF(DATEADD('DATE'[Date],1,DAY)=TODAY(),1,0)
Regards,
Etienne
What are you going to do with this column after you create it? It is unlikely that this is the best approach. What do you actually want to achieve?
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 |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
79 | |
67 | |
60 | |
45 | |
45 |