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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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