Forum Discussion
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.
5 Replies
- amitchandak
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.
- sailendraFrequent Visitor
amitchandak Thank you. Please use the link to use sample data.
- sailendraFrequent Visitor
Its the link to Power Bi file as well.