Forum Discussion
im_92
6 years agoFrequent Visitor
filter within subject range
Hi community! I have the following table: subject number quartile symptom improvement 1 Q1 no 2 Q1 no 3 Q1 no 4 Q1 yes 1 Q2 no 2 Q2 yes 3 Q2 no 4 ...
- 6 years ago
Hi im_92 ,
We can create two measures to meet your requirement.
Q1 no = CALCULATE(COUNT('Table'[symptom improvement]),FILTER('Table','Table'[quartile] = "Q1" && 'Table'[symptom improvement] = "no"))Q2 improvement = var _Q2_no = CALCULATE(COUNT('Table'[symptom improvement]),FILTER('Table','Table'[quartile] = "Q2" && 'Table'[symptom improvement] = "no")) return [Q1 no] - _Q2_noIf it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-zhenbw-msft
6 years agoCommunity Support
Hi im_92 ,
We can create two measures to meet your requirement.
Q1 no =
CALCULATE(COUNT('Table'[symptom improvement]),FILTER('Table','Table'[quartile] = "Q1" && 'Table'[symptom improvement] = "no"))
Q2 improvement =
var _Q2_no =
CALCULATE(COUNT('Table'[symptom improvement]),FILTER('Table','Table'[quartile] = "Q2" && 'Table'[symptom improvement] = "no"))
return
[Q1 no] - _Q2_no
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.