Forum Discussion

yaman123's avatar
yaman123
Post Partisan
5 years ago
Solved

Employee Promotions

Hi,    I need help with a query to show employee promotions within a selected month.    I have a date table which is used as a slice to show data for that month. MAX(date) is used.    I have a ...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi yaman123 ,

     

    So you can do some steps as follows.

    1. create a "Month" column in table "Date".

    month = MONTH('Date'[Date])

    2. create a measure and drag it into the filter of the table visual. (is 1)

    Measure = 

    var x1=SELECTEDVALUE('Date'[month])

    var x2=MAXX('Table 3',MONTH('Table 3'[FROM DATE]))

    return

    IF(x2>=x1-6&&x2<=x1,1,0)
    Result:

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Hope that's what you were looking for.

    Best Regards,

    Yuna

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.