Forum Discussion
Anonymous
5 years agoNot applicable
Filtered Distinct Count with CALCULATE not working as intended
Hi, I have one table named Query1 in my Power BI report which has about 4 million rows of data and it looks a bit like this: CustomerID Login Date Country Level Highest Level ABC 10/1...
- 4 years ago
Anonymous , Please check date does not have any timestamp. Change datatype to datetime and choose a format with time and check. If there is a timestamp, then create date only column
Date = [datetime].date
or
Date = date(year([datetime]),month([datetime]),day([datetime]))also, try with filter
Days Spent on L1 = CALCULATE( DISTINCTCOUNT (Query1[Login Date] ), filter( Query1, Query[ Level] = "1" ))
Days Spent on L2 = CALCULATE( DISTINCTCOUNT (Query1[Login Date] ), filter( Query1, Query[ Level] = "2" ))
Days Spent on L3 = CALCULATE( DISTINCTCOUNT (Query1[Login Date] ), filter( Query1, Query[ Level] = "3" ))
Fsciencetech
Helper III
4 years agoAnonymous
Noting issue in your measure, but first check your Logindate column, Is this is date datatype?, and also remove timestamp.