Forum Discussion
Getting Count from multiple values against single ID
Here's the data for reference.
Hi andycox ,
Please use below measures.
- 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!!- andycox6 years agoNew Member
Anonymous Thank you for the response, very helpful.
I have used your UniqueTags in this way:
UniqueTags = CALCULATE(DISTINCTCOUNT(Sheet1[Tag]),ALLEXCEPT(Sheet1,Sheet1[Agent Name ],Sheet1[Chat ID]))It removes the visual filter from AgentName and Chat ID to give me UniqueTags against Each ChatID.The Chat ID rows highlighted in Red have "Tag1" in it.Measure I am after will return this tableAgent Name ChatID UniqueTags Agent1 gh25 2 Agent1 xf23 2 Agent2 dxf23 2 Basically I want to keep only those results that have Tag1 in it.