Forum Discussion

racer25's avatar
racer25
Regular Visitor
1 year ago
Solved

COUNT DISTINCT

Hi    I am new to PBI as our company has long since used Qlikview but transitioning to PBI.   I have spent a decent amount of time trying to figure this one out and while I am narrowing in on the...
  • bhanu_gautam's avatar
    1 year ago

    racer25 You need to create a measure that calculates the distinct count of Expense IDs for each worker and year, and handles cases where there are no claims correctly.

     

    dax
    DistinctExpenseCount =
    VAR DistinctCount = DISTINCTCOUNT('YourTable'[Expense ID])
    RETURN
    IF(DistinctCount = BLANK(), 0, DistinctCount)