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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tananich
Frequent Visitor

Measure returning incorrect value

Hi all,

 

I have a strange issue, could someone please  help me with that.

I have a grid as in the picture below

1.jpg

 

I need to distinct count of employees with "Overreported in column "Test3" (negative value in column 'project gap")

 

I have a measure "Overreported Ppl" =  CALCULATE(Distinctcount ('Table_Name'[Employee]), FILTER( 'Table_Name', 'Table_Name[Project Gap]<0))

However it returns me employees with positive numbers in 'project gap' column and who are marked as  'Underreported' in test3 column.

I cannot figure this out how come I get something like that? Smiley Frustrated

 

Thank you

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@tananich,

 

You may try the following measure.

Measure =
COUNTROWS (
    FILTER (
        VALUES ( 'Table_Name'[Employee] ),
        CALCULATE ( SUM ( 'Table_Name'[Project Gap] ) < 0 )
    )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
tananich
Frequent Visitor

@v-chuncz-msft

thank you, that works!

v-chuncz-msft
Community Support
Community Support

@tananich,

 

You may try the following measure.

Measure =
COUNTROWS (
    FILTER (
        VALUES ( 'Table_Name'[Employee] ),
        CALCULATE ( SUM ( 'Table_Name'[Project Gap] ) < 0 )
    )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BobBI
Resolver III
Resolver III

Hi  ,

 

you this DAX , this will count emplyee where pr_gap has -ve value.

 



Overreported People = CALCULATE(DISTINCTCOUNT(valueTest[Employee]),
FILTER(valueTest,
SIGN(valueTest[Pr_gap])=-1
)
)

out put.JPG

 

Thanks,

SS

Hi @BobBI

 

Thanks for reply, I used exactly your formula however the same result see below, this is new column called test overrep ppl

 photo_2018-10-30_14-35-51.jpg

rafaelmpsantos
Responsive Resident
Responsive Resident

Try this

"Overreported Ppl" =  CALCULATE(Distinctcount ('Table_Name'[Employee]), FILTER( All('Table_Name'), 'Table_Name[Project Gap]<0))

if it solve please mark as solved, and give me your positive feedback.

Hi @rafaelmpsantos

thanks for reply, unfortunately that doesn't work, i need to count employees and this formula returns completely different value

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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