Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello !
I have a dataset with one column that contains a unique ID that indicates a phone call and another calumn that has tags of subjects detected during those calls. If a single call has 4 tags, then that means the same unique I'd would be in all 4 rows and the tags would be in the tags column in different rows.
How can I write a DAX metric to count the number of times two tags appear together in the same unique ID?
I want to use that number to include in a percentage calculation. Obviously a calculate / keepfilter option won't work because the "tags" are all in the same column.
Any help would be appreciated!
Solved! Go to Solution.
Hi @Eparfitt1002
Could you please attach a table with an example of data and the desired results so that we can better understand your request?
@Eparfitt1002
In order to achieve the desired outcome.
The first step is to add a calculated column that concatenates the texts by ID to the "height"
Dax Funtion:
A second step involves counting based on whether the combination you are seeking is present.
DAX formula for a measure
**If string order can also be reversed, you can add another comparison
with OR condition
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Eparfitt1002
Could you please attach a table with an example of data and the desired results so that we can better understand your request?
Certainly!
In the below example, I would want this formula to detect when Tags "Agent Expressed Empathy" and "Escalated Client" were both on the same call, and count the number of times that happens.
The below table would be a count of 1 when this happened on Call 4.
UniqueID | Tags |
Call 1 | Store Issue |
Call 1 | Escalated Client |
Call 2 | Billing Issue |
Call 3 | Website Issue |
Call 4 | Escalated Client |
Call 4 | Agent Expressed Empathy |
Call 5 | Billing Issue |
Do you only check that combination?
Right. I'm attempting to create a percentage that calculates how often my agents are using empathy during escalated calls.
So if it has the same UniqueID and those two values, it would count that call. Then I'll divide whatever that count is by the count of all the escalation calls to express it as a percentage.
Thanks!
@Eparfitt1002
In order to achieve the desired outcome.
The first step is to add a calculated column that concatenates the texts by ID to the "height"
Dax Funtion:
A second step involves counting based on whether the combination you are seeking is present.
DAX formula for a measure
**If string order can also be reversed, you can add another comparison
with OR condition
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
94 | |
86 | |
78 | |
70 | |
63 |
User | Count |
---|---|
114 | |
101 | |
97 | |
66 | |
59 |