Forum Discussion

Rince91's avatar
Rince91
Helper I
2 years ago
Solved

Count matching column values based on visual selection

Hi All,   I have a bar chart showing the monthly payroll, Im trying to create another visual that will provide the number of people that have started in the month i have selected on that bar chart....
  • OguzMavice's avatar
    2 years ago

    Hi Rince91 ,

     

    I think so that your master date table has relationship with Payroll Date of your Payroll Table. In this type situation, you can use "Userrelationship"  function in order to show  result based on your second date column. 

     

    First of all, you should create relationship between secondary date column and master date table.

    Then use this measure ;

     

    # People = CALCULATE(COUNT('Table'[Start Date]),USERELATIONSHIP('Date'[Date],'Table'[Start Date]))
     
    the result  ;
     

     

     

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