Forum Discussion
UditJ
2 years agoHelper III
Create a calculation using filter after some condition
I need to create a calculation where after meeting the condition it should filter out measure values. Condition is - If City = Australia && Town = A || Town = B || Town = C then Filter out Measur...
Sahir_Maharaj
2 years agoSuper User
Hello UditJ,
Can you please try to structure your DAX formula as follows:
FilteredMeasure =
CALCULATE(
[YourMeasure], // Your actual measure, e.g., [Sales]
FILTER(
'YourTable', // Your actual table name
'YourTable'[City] = "Australia" &&
(
'YourTable'[Town] = "A" ||
'YourTable'[Town] = "B" ||
'YourTable'[Town] = "C"
)
)
)
UditJ
2 years agoHelper III
Thanks for your input, I will try this out, also can we include a specific time range (Which is to be filtered) in the same calculation?