Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Targeting By Frequency

Hello, I'm a new user in Power BI and I need help to targeting users in each target. Basically we have a transactions BD with respetive user, by date. We want to define a target for each user.   T...
  • Anonymous's avatar
    Anonymous
    7 years ago

    Anonymous ,

    You could create the following Measure:

    Target = 
    var weeks = DISTINCTCOUNT(transactions[WEEK])
    var tx = COUNT(transactions[ID_TRANSACTION])
    return SWITCH(
        TRUE(),
        weeks >=4, "Lover",
        tx < 2, "Occasional",
        "Regular"
    )

    Cheers!

    Nathan