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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
BidyaSingha
Frequent Visitor

Measure returning same value for all row

 For the below Dax i am getting same value for all status but expected o/p is different value. Can anyone help!
 CALCULATE(
    DISTINCTCOUNT(EmployeeAvailability[EmployeeCode]),
EmployeeAvailability[ShortTermBench]<>BLANK())

BidyaSingha_0-1716282669029.png

 

1 ACCEPTED SOLUTION
mark_endicott
Super User
Super User

@BidyaSingha - This looks to be a relationship issue. Is the "Status" colomn in a separate table? If Yes, you need to create a relationship between EmployeeAvailability and the table containing "Status"

 

If No, and you only have one table then I would try: 

 

 CALCULATE(
    DISTINCTCOUNT(EmployeeAvailability[EmployeeCode]),
KEEPFILTERS( EmployeeAvailability[ShortTermBench]<>BLANK()))

 

If either of these work, please accept as the solution, if they do not, please share more information about your semantic model and perhaps some sample data. 

View solution in original post

1 REPLY 1
mark_endicott
Super User
Super User

@BidyaSingha - This looks to be a relationship issue. Is the "Status" colomn in a separate table? If Yes, you need to create a relationship between EmployeeAvailability and the table containing "Status"

 

If No, and you only have one table then I would try: 

 

 CALCULATE(
    DISTINCTCOUNT(EmployeeAvailability[EmployeeCode]),
KEEPFILTERS( EmployeeAvailability[ShortTermBench]<>BLANK()))

 

If either of these work, please accept as the solution, if they do not, please share more information about your semantic model and perhaps some sample data. 

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.