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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Le_Backflip
New Member

DAX Measure Sum per machine and day

Hi,

I have a list with the times of every completed Job (machinehours) for every machine (name) in our plant. 
Le_Backflip_0-1705912675599.png

I tried to create a measure to give me the sum of machinehours for each machine per day.


=
CALCULATE(SUM('job_list'[machinehours]);ALLEXCEPT('job_list';'job_list'[name];'job_list'[bookingdate]))

 

Can someone help me with the correct formula and explain me why this is only giving me the sum of machinehours per machine ?

 

Thanks!

1 ACCEPTED SOLUTION
Anonymous
Not applicable

HI @Le_Backflip,

Perhaps you can try to use the following measure fomraul if it suitable for your requirement:

formula =
CALCULATE (
    SUM ( 'job_list'[machinehours] ),
    ALLSELECTED ( 'job_list' ),
    VALUES ( 'job_list'[name] ),
    VALUES ( 'job_list'[bookingdate] )
)

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

HI @Le_Backflip,

Perhaps you can try to use the following measure fomraul if it suitable for your requirement:

formula =
CALCULATE (
    SUM ( 'job_list'[machinehours] ),
    ALLSELECTED ( 'job_list' ),
    VALUES ( 'job_list'[name] ),
    VALUES ( 'job_list'[bookingdate] )
)

Regards,

Xiaoxin Sheng

talespin
Solution Sage
Solution Sage

Can you please share the result with your original formula.

 

This removes all filters on table except [name] and [bookingdate]. So it should give you total by booking date and name.

CALCULATE(SUM('job_list'[machinehours]);ALLEXCEPT('job_list';'job_list'[name];'job_list'[bookingdate]))

 

sjoerdvn
Super User
Super User

Have you tried removing that bookingdate from the ALLEXCEPT?

Then I get the sum of machinehours per machine for the whole dataset and not per day.  

 

Le_Backflip_0-1705914837564.png

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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