cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RMSLUIS Frequent Visitor
Frequent Visitor

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.

 

Thanks,

Rui Luís

 

The target rules are:

TARGETRule
Lover≥ 4 transactions in 4 different weeks
Regular2 or 3 transactions
Occasionalothers

 

The transactions BD:

ID_TRANSACTIONUSERDATEWEEK
1001A02-02-20195
1002B02-02-20195
1003B02-02-20195
1004B02-02-20195
1005C10-02-20196
1006A10-02-20196
1007B10-02-20196
1008F11-02-20197
1009G11-02-20197
1010C11-02-20197
1011A20-02-20198
1012C02-03-20199
1013A03-03-20199
1014A06-03-201910
1015A07-03-201910

 

 

The expected results are:

USERTARGET
ALover
BRegular
CRegular
FOccasional
GOccasional

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Targeting By Frequency

@RMSLUIS ,

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

 

View solution in original post

1 REPLY 1
Super User
Super User

Re: Targeting By Frequency

@RMSLUIS ,

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

 

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,316)