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

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.

Reply
Gumberculeez
Helper II
Helper II

Multi query sum showing only today's date

Hey All;

 

Curious how I can do this?  I have the multi query sum down...

 

Mileage plus Mileage =
SUM('SCInvLabor'[Mileage]) + SUM('SCOpenLabor'[Mileage])  
 
however, I'd like to add a filter to show just the above just for today.
 
an assist would be fantastic! 🙂
 

 

 

1 ACCEPTED SOLUTION

Hi @Gumberculeez ,

 

than try this.

 

 

SELECT
*,
CAST(DispatchDate as Date) AS DispatchDate_New
FROM _custom_eviews.RTPowerBI (NOLOCK)

 

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


View solution in original post

25 REPLIES 25

Hi @Gumberculeez ,

create a date table

Date = 
ADDCOLUMNS (
        CALENDARAUTO( ); 
    "Year"; YEAR ( [Date] );
    "Month Name"; FORMAT ( [Date]; "mmmm" );
    "Month Number"; MONTH ( [Date] );
    "Weekday"; FORMAT ( [Date]; "dddd" );
    "Weekday number"; WEEKDAY( [Date] );
    "Quarter"; "Q" & TRUNC ( ( MONTH ( [Date] ) - 1 ) / 3 ) + 1;
    "Day of Month"; Day([Date])
)

add the relationship to the date table

Mileage plus Mileage =
CALCULATE(
SUM('SCInvLabor'[Mileage]) + SUM('SCOpenLabor'[Mileage]);  
'Date'[Date] = TODAY())

 

If I answer you question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


hmm... thanks for the assist here, 

 

Actually getting a syntax error with that : /

Annotation 2019-11-28 133606.png

Hi @Gumberculeez ,

 

replace ; with , 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Thanks... that worked...

 

however, getting the same syntax error with the relationship...  changed to a "," with no results:

 

Almost there.png

Hi @Gumberculeez 

 

the CALCULATE is missing...

 

Mileage plus Mileage =
CALCULATE(
SUM('SCInvLabor'[Mileage]) + SUM('SCOpenLabor'[Mileage]);  
'Date'[Date] = TODAY())

If I answer you question, please mark my post as solution, this will also help others.

Please give Kudos for support. 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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