Forum Discussion

RichOB's avatar
RichOB
Post Partisan
1 year ago
Solved

Measure to filter multiple categories

Hi, I have a basic filtering question. Using the table below, if I want a measure that collects ages just between 20-23 which gives me the count of 5, what measure would that be, please?

Customer_IDAge
116
217
318
420
520
621
722
823
924
1025
  • RichOB , Create a measure using

     

    CountOfAges = CALCULATE(
    COUNT(your_table_name[Customer_ID]),
    your_table_name[Age] >= 20,
    your_table_name[Age] <= 23
    )

3 Replies

  • RichOB , Create a measure using

     

    CountOfAges = CALCULATE(
    COUNT(your_table_name[Customer_ID]),
    your_table_name[Age] >= 20,
    your_table_name[Age] <= 23
    )

  • My Count of 20 to 23 = CALCULATE ( COUNT ( [Customer_ID] , [Age] >= 20 && [Age] <= 23 )

  • Anonymous's avatar
    Anonymous
    Not applicable

    Your solution is so great ToddChitt and bhanu_gautam 

    Hi, RichOB 

    I wish you all the best. Previously Super user have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
    If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
    If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
    Thank you for your patience and look forward to hearing from you.

     

     

    Best Regards

    Jianpeng Li