Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
Anonymous
Not applicable

Today and Yesterday Totals

Hello Community -  I have tried this measure below, but it gives me YTD values.   What I want is just today, specifically.    

 

So, for example if we shipped 500,000 dollars YTD....but today we just shipped 25,000....I want the card visual to say $25,000

 

Today Net Shipped Revenue = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),FILTER('Date Table',TODAY()))
 
Likewise for yesterday.   I tried using PreviousDay, but the only way it gives me the correct value is if I am filtered down on a visual that shows today's date.   Then, the card visual shows me the correct value for Yesterday.    But not what I am looking for.  I need the card visual to always show the specifical value for yesterday's shipments, regardless of any other filters applied on the page.   Thanks Community!
 
Shipments Yesterday = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),PREVIOUSDAY('Date Table'[Date]))
1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Anonymous I would keep it simple:

 

Today Net Shipped Revenue = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),'Date Table'[Date] = TODAY())

Today Net Shipped Revenue = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),'Date Table'[Date] = TODAY()-1)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

@Anonymous I would keep it simple:

 

Today Net Shipped Revenue = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),'Date Table'[Date] = TODAY())

Today Net Shipped Revenue = CALCULATE(SUM(ShippedOrdersALL_Query[ShippedPrice]),'Date Table'[Date] = TODAY()-1)


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank You @Greg_Deckler    Worked perfectly.

selimovd
Super User
Super User

Hey @Anonymous ,

 

why don't you use DATEDD with -1 DAY from TODAY(). Like this you should get the value from yesterday.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

Check out the April 2025 Power BI update to learn about new features.

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

Find out what's new and trending in the Fabric community.