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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Creating Buckets with Amount of Conversations for each of the user

Hi All,

 

I have a log file from the database of the chatbot. I would like to get to know how to create the columns where I would specify in boolean form the number of conversations per user. 

My input data format is the following one: 

1.PNG

I created the measure specifying the distinc amount of conversations per user 

NoOFConversations = DISTINCTCOUNT('dcb'[ConversationId])

 getting the following output:

2.PNG

I would like to be able to create the graph which on the X axis will have lets say months and the % of Users who had 0 Conversations, 1 Conversation, 2-5 Conversations and 6+ COnversations. I need to find a formula which will count the number of users based on the criteria mentioned above. I think I should create columns specifying these four cases but I do not know how to do it. Please help! 🙂

 
 
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create column like DAX below.

 

Conversation Group =
var NoOFConversations= CALCULATE(DISTINCTCOUNT('dcb'[ConversationId]),FILTER('dcb','dcb'[UserId]=EARLIER('dcb'[UserId])))
return
SWITCH(TRUE(), NoOFConversations =0,"0 Conversation", NoOFConversations =1,"1 Conversation", NoOFConversations >=2&&NoOFConversations <=5,"2-5 Conversations", NoOFConversations >=6,"6+ Conversations")

Then you can choose Clustered column chart to display result, put this new column onto Column values box, set it show value as " percent of grand total ".

43.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

You can create column like DAX below.

 

Conversation Group =
var NoOFConversations= CALCULATE(DISTINCTCOUNT('dcb'[ConversationId]),FILTER('dcb','dcb'[UserId]=EARLIER('dcb'[UserId])))
return
SWITCH(TRUE(), NoOFConversations =0,"0 Conversation", NoOFConversations =1,"1 Conversation", NoOFConversations >=2&&NoOFConversations <=5,"2-5 Conversations", NoOFConversations >=6,"6+ Conversations")

Then you can choose Clustered column chart to display result, put this new column onto Column values box, set it show value as " percent of grand total ".

43.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Best Regards,

Amy

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.

Top Solution Authors
Top Kudoed Authors