Forum Discussion

damtran's avatar
damtran
Regular Visitor
3 years ago
Solved

Indicate New vs Existing Customer

Hi everyone,

I'd like to ask for help in this case:

- Table has 3 columns: Customer, Revenue, and Year

- Some customers have revenue in both 2022 and 2023 = Existing, some just have revenue in 2023 = New

Could you please advise how to create a new column with measure which can tell Existing or New based on customer name, revenue and year?

Thanks in advance.

  • hi damtran 

    try to replace:
     
    COUNTROWS(
        FILTER(
           _table,
            TableName[Year] = _currentyear
        )
    )
     
    with:
     
    COUNTROWS(
        CALCULATETABLE(
           SUMMARIZE(_table, TableName[ClientID])
            TableName[Year] = _currentyear
        )
    )
     
    other parts are similar.

4 Replies