Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a measure where I use an expression of
Count ({< [Term] = {'Yes'}, [Term Reason] -= {'Unknown'}>} EmployeeID)
When I use this in a pivot table and group by YearMonth I get a total of 791 records which is correct.
When I use the same expression in a KPI I get 784 records. Looks like its removing duplicate employeeIDs. Duplicate records can occur since an employee can be termed more than once in a given period.
I am not sure what is going on since I am using the same master measure in both types of charts.
Any ideas why it would do this?
Are you sure that you are not using DISTINCT in the expression by any chance?
I am not. That is why I am confused. The expression is exactly as I have in my post.
What happens when you use this as a measure directly in the chart rather than using it as a master measure? Does it still behave the same way?
What happens if u use :
if([Term] = {'Yes'} and[Term Reason] <> {'Unknown'},Count ( EmployeeID) )
how do I do that?
Wherever you are using the master measure, can't you really replace that with the measure itself? I am new to Qlik Sense, so don't really know how it works... but may be omarbensalem might be able to help better on this
I copied that and it says there is an error in the expression
')' is expected
I added the measure without using the master item and same results
One way to resolve this would be to try this
Sum(Aggr(Count ({< [Term] = {'Yes'}, [Term Reason] -= {'Unknown'}>} EmployeeID), YearMonth))
but even it works, that would still not explain why it doesn't work in the first place