Forum Discussion

BillyT_350's avatar
BillyT_350
Icon for Helper V rankHelper V
7 years ago
Solved

Measures: Getting Around Conflicting Filters and Table Relations

I'm having some issues getting a measure to return the number that I want. I have three tables: a calendar table, a table with details on current employees, and a table with events pertaining to cur...
  • BillyT_350's avatar
    7 years ago

    As I think has been stated, the problem is that the relationship between the date dimension the the Action_Date needs to be ignored. I learned that this can be done using the function USERELATIONSHIP(), in which you explicitely define the relationship you want used.

    My new formula reads:

    EventCount = CALCULATE(COUNT('Event'[EMPLID])
        , USERELATIONSHIP('Event'[CURRENT_HIRE_DATE]
    , 'Calendar'[DIM_DATE]
    ) )

     

    And it correctly returns, what at the time of the original postings would have been, 370 for October of 2018 AND has the bars (yellow) in the correct time periods on the chart:

    Thanks for really sticking with the hard questions, Microsoft...