Forum Discussion

Newkidonblock22's avatar
Newkidonblock22
Regular Visitor
2 years ago
Solved

I NEED HELP TO COUNT ROWS FOR A PARTICULAR CONSOLIDATED YEAR CATEGORY

There are 3 transactions under this column which are renew policy, new business, and cancellation. I need help to countrows for renew policy or new business and write the measure for 2023...
  • audreygerred's avatar
    audreygerred
    2 years ago

    Woops - sorry - I missed the part where you mentioned the years. The below will give you the row count for renew or new and the years of 2023 and 2024.

     

    FilteredRowCount := 
    CALCULATE(
        [Row Count],
        'YourTable'[Transaction] IN { "Renew policy", "New business" },
        YEAR('YourTable'[Date]) IN {2023, 2024}
    )