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
Ustinovdl
Helper I
Helper I

Create client's cohort by its transactions!

Hello!

I need help!

 

I have lot's of data like this:

PAYED_OTHERSPAYED_E_TICKETSPAYED_MOBILEPAYED_P2PPAYED_UTILITIESPAYED_ADDITIONAL_SERVICESPAYED_DISTRIBUTORSPAYED_TELECOMMUNICATIONSPAYED_MONTHLY_FEEPAYED_E_GOVBUSINESS_TYPEUSER_IDLOGGED_INANONYMOUSR_TYPECHARGE_MONTHLY_FEETRANSACTIONSTURNOVER
NNNNYNNNNNB2B114110YY1342,67
NNYNYNNYYNB2C114310YN19,9
NNYNYNNYYNB2C114310YN3593,64
NNYNYNNYYNB2C114310YN3309,1
NNYNYNNYYNB2C114310YN2310
NNNNNNNYNNB2B116110YY2235,5
NNYNYNNNNNB2C121210YY24561,81
NNYNYNNNNNB2C121210YY5250
NNYNNNNNNNB2B122210YY150
NNYNNNNNNNB2B126310YY150
NNYNYNNYYNB2C135610YY32141,31
NNYNYNNYYNB2C135610YY41100
NNYNYNNYYNB2C135610YY1150
NNYNYNNYYNB2C135610YY19,9
NNYYYNNYYNB2C146910YY3321,75
NNYYYNNYYNB2C146910YY3650
NNYYYNNYYNB2C146910YY1171
NNYYYNNYYNB2C146910YY35892

 

 

 

 

I want to analyze data by created cohorts by measures on turnover and transactions.

 

My logic is:

Sum transactions and turnover on every client + selected filters even if the user_id field unselected (maybe values dax function)

After that I would like to create fields like Transaction cohort and Turnover cohort like this:

Transaction cohort = switch(True();[Transactions by client] = 1;"1";
[Transactions by client] = 2;"2";
[Transactions by client] = 3;"3";
[Transactions by client] = 4;"4";
[Transactions by client] = 5;"5";
[Transactions by client] = 6;"6";
[Transactions by client] = 7;"7";
[Transactions by client] = 8;"8";
[Transactions by client] = 9;"9";
"10+")

 

and the same for Turnover by client.

 

But it doesn't work!!!! User_id is on the every transaction cohort if I have the row for this client with that value of transactions! How can I first of all calculated correct sum of transactions and then put the client in the correct cohort?!

 

 

 

6 REPLIES 6
Ustinovdl
Helper I
Helper I

I found out a solution but got another problem.

the solution is:

Transactions by client = CALCULATE([Transactions];FILTER(Table;table[CLIENT_ID]))

Transaction cohort = switch(True();[Transactions by client] = 1;"1";
[Transactions by client] = 2;"2";
[Transactions by client] = 3;"3";
[Transactions by client] = 4;"4";
[Transactions by client] = 5;"5";
[Transactions by client] = 6;"6";
[Transactions by client] = 7;"7";
[Transactions by client] = 8;"8";
[Transactions by client] = 9;"9";
"10+")

 

when I tried to add the same cohort column by turnover I got an error: A circular dependency was detected

 

 

I was wrong! It doesn't work

Hi @Ustinovdl,

How so you  add the same cohort column by turnover? It'd hard to reproduce without sample data. Could you please share your .pbix file for further analysis.

Best Regards,
Angelia

I was wrong. It doesn't work.

I don't know how can I calculate sum of transactions for every client including selected filters and then create a cohort column (

Hi @Ustinovdl,

It's hard to reproduce your scenario. What's formula of [Transactions] in your first reply.

Thanks,
Angelia

Transactions = sum(table[Transactions.])

Hello!

I need help!

 

I have lot's of data like this:

PAYED_OTHERSPAYED_E_TICKETSPAYED_MOBILEPAYED_P2PPAYED_UTILITIESPAYED_ADDITIONAL_SERVICESPAYED_DISTRIBUTORSPAYED_TELECOMMUNICATIONSPAYED_MONTHLY_FEEPAYED_E_GOVBUSINESS_TYPEUSER_IDLOGGED_INANONYMOUSR_TYPECHARGE_MONTHLY_FEETRANSACTIONSTURNOVER
NNNNYNNNNNB2B114110YY1342,67
NNYNYNNYYNB2C114310YN19,9
NNYNYNNYYNB2C114310YN3593,64
NNYNYNNYYNB2C114310YN3309,1
NNYNYNNYYNB2C114310YN2310
NNNNNNNYNNB2B116110YY2235,5
NNYNYNNNNNB2C121210YY24561,81
NNYNYNNNNNB2C121210YY5250
NNYNNNNNNNB2B122210YY150
NNYNNNNNNNB2B126310YY150
NNYNYNNYYNB2C135610YY32141,31
NNYNYNNYYNB2C135610YY41100
NNYNYNNYYNB2C135610YY1150
NNYNYNNYYNB2C135610YY19,9
NNYYYNNYYNB2C146910YY3321,75
NNYYYNNYYNB2C146910YY3650
NNYYYNNYYNB2C146910YY1171
NNYYYNNYYNB2C146910YY35892

 

 

 

 

I want to analyze data by created cohorts by measures on turnover and transactions.

 

My logic is:

Sum transactions and turnover on every client + selected filters even if the user_id field unselected (maybe values dax function)

After that I would like to create fields like Transaction cohort and Turnover cohort like this:

Transaction cohort = switch(True();[Transactions by client] = 1;"1";
[Transactions by client] = 2;"2";
[Transactions by client] = 3;"3";
[Transactions by client] = 4;"4";
[Transactions by client] = 5;"5";
[Transactions by client] = 6;"6";
[Transactions by client] = 7;"7";
[Transactions by client] = 8;"8";
[Transactions by client] = 9;"9";
"10+")

 

and the same for Turnover by client.

 

But it doesn't work!!!! User_id is on the every transaction cohort if I have the row for this client with that value of transactions! How can I first of all calculated correct sum of transactions and then put the client in the correct cohort?!

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.