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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
sailendra
Frequent Visitor

Filtering using a measure in Calculate not working

Hi All,

 

I am trying to use a "measure" to FILTER a table within CALCULATE (Eg: CALCULATE(count(emp id), FILTER(Table, Column > [measure] ))). This doesn't seem to work.

 

Actually, I am trying to find the total number of dropouts for any given training. 

 

For example, When Python is selected.

Step 1: I am looking at the average days to completion by all the employees (7.5).

Step 2: Multiply 2 with Average Time for Completion (as obtained from Step 1). This gives me a threshold (2*7.5 = 15).

Step 3: Filtering the table where "Days since last activity" > 15. This should give me a count as 1 but I'm getting a count of 2. (Refer table)

 

Request for your kind help.dropout.JPG

5 REPLIES 5
amitchandak
Super User
Super User

@sailendra , to make measure work as filter you need use some group by or level

 

example

countx(values(table[emp id]),

CALCULATE(count(Table[emp id]), FILTER(Table,Table[ Column] > [measure] )))

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak Thank you. Please use the link to use sample data.

https://1drv.ms/x/s!AvbLSL0qLnNvlUrITGx3l88DPmtZ?e=n2CwgN

Its the link to Power Bi file as well.

https://1drv.ms/u/s!AvbLSL0qLnNvlUmyFg0DOHDgs0Tq?e=lHkem0

@sailendra , Please find the attached pbix, after signature, if that can help

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak  Thanks, it helps.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.