Forum Discussion
Auski
2 years agoAdvocate I
DAX calculation based on 2 text values in same column
Hi guys,
I feel like this one might be an easy one, but for some reason I can't get it.
Working Dax 1:
Working Dax 1:
Abandoned = SUM('Inbound Queues'[Abandon])
Working Dax 2
Total Abandoned = CALCULATE(
[Abandoned],
FILTER(ALL('Inbound Queues'[queue_name]),
'Inbound Queues'[queue_name]= "FS - FC Queue"
)
)
The above DAX works great for what I need however I really need to add a second queue "FS - MQ Queue" so that they both return a combined value for any filtered date. I feel that curly brackets come into it somehow, but not quite getting it.
The above DAX works great for what I need however I really need to add a second queue "FS - MQ Queue" so that they both return a combined value for any filtered date. I feel that curly brackets come into it somehow, but not quite getting it.
| Interval_Start | queue_name | mediatype | Abandon |
| 13/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 13/11/2023 0:00 | FS - MQ Queue | voice | 5 |
| 12/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 12/11/2023 0:00 | FS - MQ Queue | voice | 11 |
| 11/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 11/11/2023 0:00 | FS - MQ Queue | voice | 4 |
| 10/11/2023 0:00 | FS - FC Queue | voice | 2 |
| 10/11/2023 0:00 | FS - MQ Queue | voice | 0 |
| 9/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 9/11/2023 0:00 | FS - MQ Queue | voice | 3 |
| 8/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 8/11/2023 0:00 | FS - MQ Queue | voice | 0 |
| 7/11/2023 0:00 | FS - FC Queue | voice | 1 |
| 7/11/2023 0:00 | FS - MQ Queue | voice | 5 |
| 6/11/2023 0:00 | FS - FC Queue | voice | 0 |
| 6/11/2023 0:00 | FS - MQ Queue | voice | 2 |
| 5/11/2023 0:00 | FS - FC Queue | voice | 1 |
Date filtered 13/11/2023 should return 5 abandons.
Hope this makes sense. It is getting late and my head is so scrabbled.
Thanks!
in theory this should work but haven't tested it
Total Abandoned =
CALCULATE (
[Abandoned],
FILTER (
ALL ( 'Inbound Queues'[queue_name] ),
'Inbound Queues'[queue_name] IN { "FS - FC Queue", "MQ - FC Queue" }
)
)
2 Replies
- vanessafvgCommunity Champion
in theory this should work but haven't tested it
Total Abandoned =
CALCULATE (
[Abandoned],
FILTER (
ALL ( 'Inbound Queues'[queue_name] ),
'Inbound Queues'[queue_name] IN { "FS - FC Queue", "MQ - FC Queue" }
)
)- AuskiAdvocate I
Thanks so much vanessafvg! This works perfectly 😁