Forum Discussion

Bokchoy's avatar
Bokchoy
Icon for Helper II rankHelper II
5 years ago
Solved

Count x based on periodid

Hi all,   I want to count the number of clients who have traded within this current period (15days) by periodid. I have a jobs table and a calendar table. this is connected via 1:N relationship fr...
  • v-luwang-msft's avatar
    5 years ago

    Hi Bokchoy ,

    A slight adjustment has been made to your second dax, see:

    test = 
    CALCULATE (
        DISTINCTCOUNT ( job[client_id] ),FILTER(ALL('calendar'),
        calendar[periodid] = [this period id]
    ))
    

    And final show the below:

    Wish it is helpful for you!

     

    Best Regards

    Lucien