Forum Discussion
distinct employee count Less than threshold value
Hello
My requriment to show count of employees whose variance amount less than $1M ,so to achieve this i'm doing calculations of actuals & forceast, variance in 3 measure columns. so in return function should i write
If(variance < 1.0 ,calculate(distinctcount(employee), table(all)), 0).?
Measure1 actuals = group by (date, location, service interval, name, actuals)
Measure 2 Forecast = group by (date, location, service interval, name, forecast)
Measure 3 variance = actuals/forecast
Thanks
VS
Hi refint650
You can achieve this using following measure:
Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )
Hope this helps!
Theo 🙂
Hi, refint650
When Actuals, Forecast, and Variance are all Measure, you can also try the following methods.
Measure = IF ( [Measure Variance] < 1, CALCULATE ( DISTINCTCOUNT ( 'Table'[Name] ), FILTER ( ALL ( 'Table' ), [Measure Variance] < 1 ) ), 0 )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more.
5 Replies
- v-zhangtiCommunity Support
Hi, refint650
When Actuals, Forecast, and Variance are all Measure, you can also try the following methods.
Measure = IF ( [Measure Variance] < 1, CALCULATE ( DISTINCTCOUNT ( 'Table'[Name] ), FILTER ( ALL ( 'Table' ), [Measure Variance] < 1 ) ), 0 )Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more.
- TheoCCommunity Champion
Hi @refint650
You can achieve this using following measure:
Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )
Hope this helps!
Theo 🙂
- Ashish_MathurSuper User
Hi,
Try this measure
=countrows(filter(values(Data[Name]),[Variance]<1))
Hope this helps.
- TheoCCommunity Champion
Hi @refint650
You can achieve this using following measure:
Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )
Hope this helps!
Theo