Forum Discussion
Getting Count from multiple values against single ID
Here's the data for reference.
- Anonymous6 years agoNot applicable
Hi andycox ,
Please use below measures.
Contains Tag1 = CALCULATE(COUNT(Sheet1[Chat ID]),FILTER(ALLEXCEPT(Sheet1,Sheet1[Agent Name ]),Sheet1[Tag] = "Tag1"))DistinctChatID = CALCULATE(DISTINCTCOUNT(Sheet1[Chat ID]), FILTER(ALLEXCEPT(Sheet1,Sheet1[Agent Name ]),Sheet1[Tag] = "Tag1"))Incase you need the unique tags fo each agentUnique Tags = CALCULATE(DISTINCTCOUNT(Sheet1[Tag]),ALLEXCEPT(Sheet1,Sheet1[Agent Name ]))Regards,Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!!- andycox6 years agoNew Member
Thank you Anonymous for quick reply.
Here's what I am struggling with still.
Average of unique tags by each agent for all chats which contain Tag1.
E.g. If an Agent has 150 chats. 100 of them have Tag1 and other tags. 50 of them do not have Tag1.
I need to calculate the average of unique tags used for each of those 100 chats.
Also , in another calculation, list down all unique chat IDs ( with Tag1) and see how many tags does each conversation have.
Is that something you can help with?
- Anonymous6 years agoNot applicable
andycox ,
The question is totally confusing.
No idea on what does this mean 'unique tags by each agent for all chats which contain Tag1' .
You have a column for Tags where you have values like Tag1 , Tag3, etc. What does unique tag which contains Tag1 mean. Do you want the unique chat id's which contain Tag1 ?
For the 2nd question, is this what you need.
DistinctChatIDC = CONCATENATEX( FILTER(Sheet1, Sheet1[Tag] = "Tag1"),Sheet1[Chat ID],",")Regards,Harsh NathaniDid I answer your question? Mark my post as a solution! Appreciate with a Kudos!!