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 everyone,
I'm working with a dashboard where I want a card to display the sales from yesterday, without using a slicer.
What I have done so far is to insert the sales data into "Fields" for the visual, I then suppose that I in some way should filter the visual in order for the card to display the sales figures from yesterday. Is any of you having a good solution to this?
I would really appriciate your help!
Best
Solved! Go to Solution.
@Anonymous , Try a measure like
yesterday=CALCULATE(sum('order'[Qty]),'Date'[Date]= today()-1)
This will work if you do not have date filter. If you have some date filter
yesterday=CALCULATE(sum('order'[Qty]),filter(all('Date'),'Date'[Date]= today()-1))
@Anonymous , Try a measure like
yesterday=CALCULATE(sum('order'[Qty]),'Date'[Date]= today()-1)
This will work if you do not have date filter. If you have some date filter
yesterday=CALCULATE(sum('order'[Qty]),filter(all('Date'),'Date'[Date]= today()-1))
Hey @amitchandak, this helped me a lot too.
I used the same formula to automatically pull yesterday's sales revenues. However, I also want to pull sales revenues from yesterday last year.
Is there an edit I can make to the formula to pull that date?
Thanks!
It worked, thank you!
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 |
---|---|
58 | |
55 | |
55 | |
37 | |
30 |
User | Count |
---|---|
78 | |
64 | |
45 | |
43 | |
40 |