March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I'm trying to create a measure that will show me the number of records where:
OTHER_COST_DESC contains either '23917401' or '24546941' but DOES NOT contains 'FREIGHT'.
I'm trying to use this:
Num_EGR_CLAIMS =
CALCULATE(COUNTROWS(
FILTER(OTHER_COSTS,CONTAINSSTRING(OTHER_COSTS[OTHER_COST_DESCRIPTION],"23917401")
||CONTAINSSTRING(OTHER_COSTS[OTHER_COST_DESCRIPTION],"24546941")),
FILTER(OTHER_COSTS,NOT(CONTAINSSTRING(OTHER_COSTS[OTHER_COST_DESCRIPTION],"FREIGHT")))
)
but I get errors in the 'not contains' part. I've tried so many different combinations but cannot get it ot work. Any suggestions?
Thanks!
Solved! Go to Solution.
Please try below measure,
Num_EGR_CLAIMS =
CALCULATE (
COUNTROWS (
FILTER (
OTHER_COSTS,
OTHER_COSTS[OTHER_COST_DESCRIPTION] <> "FREIGHT"
&& ( OTHER_COSTS[OTHER_COST_DESCRIPTION] = "23917401"
|| OTHER_COSTS[OTHER_COST_DESCRIPTION] = "24546941" )
)
)
)
Please try below measure,
Num_EGR_CLAIMS =
CALCULATE (
COUNTROWS (
FILTER (
OTHER_COSTS,
OTHER_COSTS[OTHER_COST_DESCRIPTION] <> "FREIGHT"
&& ( OTHER_COSTS[OTHER_COST_DESCRIPTION] = "23917401"
|| OTHER_COSTS[OTHER_COST_DESCRIPTION] = "24546941" )
)
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |