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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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