Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
refint650
Helper III
Helper III

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

 

refint650_0-1645806352684.png

 

 

Thanks

VS

2 ACCEPTED SOLUTIONS
TheoC
Super User
Super User

Hi @refint650 

 

You can achieve this using following measure:

 

Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )

 

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

View solution in original post

v-zhangti
Community Support
Community 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
)

vzhangti_0-1646103657533.png

 

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.

View solution in original post

5 REPLIES 5
TheoC
Super User
Super User

Hi @refint650 

 

You can achieve this using following measure:

 

Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )

 

Hope this helps!

Theo

 

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Ashish_Mathur
Super User
Super User

Hi,

Try this measure

=countrows(filter(values(Data[Name]),[Variance]<1))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
TheoC
Super User
Super User

Hi @refint650 

 

You can achieve this using following measure:

 

Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )

 

Hope this helps!

Theo 🙂

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

v-zhangti
Community Support
Community 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
)

vzhangti_0-1646103657533.png

 

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.

TheoC
Super User
Super User

Hi @refint650 

 

You can achieve this using following measure:

 

Measure = CALCULATE ( DISTINCTCOUNT ( 'Table'[Employee Name] ) , FILTER ( 'Table' , 'Table'[Amount] < 1 ) )

 

Hope this helps!

Theo 🙂

 

If I have posted a response that resolves your question, please accept it as a solution to formally close the post.

Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!

Want to connect?www.linkedin.com/in/theoconias

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors