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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Auski
Helper I
Helper 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:
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.
 

Interval_Startqueue_namemediatypeAbandon
13/11/2023 0:00FS - FC Queuevoice0
13/11/2023 0:00FS - MQ Queuevoice5
12/11/2023 0:00FS - FC Queuevoice0
12/11/2023 0:00FS - MQ Queuevoice11
11/11/2023 0:00FS - FC Queuevoice0
11/11/2023 0:00FS - MQ Queuevoice4
10/11/2023 0:00FS - FC Queuevoice2
10/11/2023 0:00FS - MQ Queuevoice0
9/11/2023 0:00FS - FC Queuevoice0
9/11/2023 0:00FS - MQ Queuevoice3
8/11/2023 0:00FS - FC Queuevoice0
8/11/2023 0:00FS - MQ Queuevoice0
7/11/2023 0:00FS - FC Queuevoice1
7/11/2023 0:00FS - MQ Queuevoice5
6/11/2023 0:00FS - FC Queuevoice0
6/11/2023 0:00FS - MQ Queuevoice2
5/11/2023 0:00FS - FC Queuevoice1

Date filtered 13/11/2023 should return 5 abandons.

Hope this makes sense. It is getting late and my head is so scrabbled.

Thanks!
1 ACCEPTED SOLUTION
vanessafvg
Super User
Super User

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" }
)
)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
vanessafvg
Super User
Super User

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" }
)
)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Thanks so much vanessafvg! This works perfectly 😁

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.