Forum Discussion
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
- v-piga-msftResident 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