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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
TinyElephant
Helper III
Helper III

Multiple calculations in a Measure

Hello,

Can anyone correct the last line of my DAX formula?

 

var Work_Days = 
CALCULATE(
    DISTINCTCOUNT('July 2021'[Date]),
    FILTER(
        'July 2021',
        'July 2021'[Time code] <> "PH"
            && WEEKDAY('July 2021'[Date],2) < 6
    ))
VAR WFW = SUMX(FILTER('July 2021','July 2021'[Project Name]="WFW"), 'July 2021'[Hours])
VAR emp_count = DISTINCTCOUNT('July 2021'[Employee Name])
RETURN
    (((emp_count * Work_Days * 8.5) - WFW)/ emp_count * Work_Days * 8.5)

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@TinyElephant , what is the issue you are facing

 

try like

RETURN
divide(((emp_count * Work_Days * 8.5) - WFW), emp_count * Work_Days * 8.5)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@TinyElephant , what is the issue you are facing

 

try like

RETURN
divide(((emp_count * Work_Days * 8.5) - WFW), emp_count * Work_Days * 8.5)

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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