Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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
Anonymous
Not applicable

@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

 

View solution in original post

1 REPLY 1
Anonymous
Not applicable

@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

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.