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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.