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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

DAX Multiple Filters applied to Measure

I am trying to create a measure which will count total values. To get to this total value, the goal is to apply 3 filters which have exact strings from 2 different columns.

Below is what I have tried to cook up in 2 different versions but they are not working. Am I on the right track? Do I have to create 3 measures to get this to work? Any advice on how I can optimize my DAX formula will be greatly appreciated!

DAX V1:
=
VAR Yes300 = FILTER( FS_Call_Bill_Status, CONTAINSSTRING( FS_Call_Bill_Status[300DayOver], "Yes" ) )
VAR ActivePending = FILTER( FS_Call_Bill_Status, CONTAINSSTRING( FS_Call_Bill_Status[call_status_type], "Active" || "Pending" ) )
RETURN
CALCULATE(
[ContractidDISTINCTCOUNT],
Yes300, ActivePending
)

DAX V2:
=
CALCULATE(
[ContractidDISTINCTCOUNT],
FILTER( FS_Call_Bill_Status,
CONTAINSSTRING( FS_Call_Bill_Status[300DayOver], "Yes" )
),
FILTER( FS_Call_Bill_Status,
CONTAINSSTRING( FS_Call_Bill_Status[call_status_type], "Active" )
),
FILTER( FS_Call_Bill_Status,
CONTAINSSTRING( FS_Call_Bill_Status, "Pending" )
)
)

1 REPLY 1
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

To understand your scenario better, could you share some data sample and your desired output so that we could help further on it?

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.