Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculating fixed salary based on worked days

Hi all, I'm trying to calculate fixed salary of delivery personel. I choosed the person and filtered dates   Total number of working days in the month = CALCULATE(COUNTX('courier grafic','...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, Anonymous 

    I am not sure how your data model looks like, but if I assume you created your date-slicer by using the column from Courier Grafic Table, please try the below measure.

     

    Total number of working days in the month =
    VAR currentmonth =
    MONTH ( MAX ( 'courier grafic'[date] ) )
    RETURN
    CALCULATE (
    COUNTX ( 'courier grafic', 'courier grafic'[time_beg] ),
    FILTER (
    ALL ( 'courier grafic'[date] ),
    MONTH ( 'courier grafic'[date] ) = currentmonth
    )
    )

     

     

    Hi, My name is Jihwan Kim.

     

    If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

     

    Linkedin: https://www.linkedin.com/in/jihwankim1975/