Forum Discussion
Matt0515
5 years agoFrequent Visitor
Creating measure to filter rows between two filtered values
Hello experts, I am trying to create a measure to count the number of rows between two values of a column in my table. While I can figure it out by using the filter pane, I cant seem to nail ...
- 5 years ago
Matt0515
Try this measure, pleasePending Auto-Expire = CALCULATE ( COUNTROWS ( '1_AQLs_2019_TD' ), '1_AQLs_2019_TD'[Status] = "Not Started", FILTER ( ALL('1_AQLs_2019_TD'[Activity Length (week days)] ), '1_AQLs_2019_TD'[Activity Length (week days)] >= 20 && '1_AQLs_2019_TD'[Activity Length (week days)] <= 31 ) )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
AlB
5 years agoCommunity Champion
Hi Matt0515
You need an AND rather than an OR. And you can use the simplified version for the filters in the CALCULATE arguments:
Pending Auto-Expire =
CALCULATE (
COUNTROWS ( '1_AQLs_2019_TD' ),
'1_AQLs_2019_TD'[Status] = "Not Started",
'1_AQLs_2019_TD'[Activity Length (week days)] >= 20,
'1_AQLs_2019_TD'[Activity Length (week days)] <= 31
)
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Matt05155 years agoFrequent Visitor
Thank you this works for what I need!
Thanks again!