Forum Discussion
racer25
1 year agoRegular Visitor
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...
- 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)
bhanu_gautam
Super User
1 year agoracer25 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)