cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TinyElephant
Helper II
Helper II

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)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

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)

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.