Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I have the following code
PivCouplers-Male =
SUMX(
FILTER(
PivCouplers,
CONTAINSSTRING(('PivCouplers'[shape_code]),"m")),[SumOfShapeCode])
How do I add an aditional Filter below CONTAINSSTRING to include something along the lines of AND take the latest model, i.e. what is the syntax for 2 filters or more on the SUMX ?
Thanks
Solved! Go to Solution.
Hi @JL0101
Return is missing from your formula, so please try this:
VAR MaxRevision =
MAX ( 'PivCouplers'[A-schedule_revision_numbers] )
RETURN
SUMX (
FILTER (
PivCouplers,
CONTAINSSTRING ( ( 'PivCouplers'[shape_code] ), "m" )
&& 'PivCouplers'[A-schedule_revision_numbers] = MaxRevision
),
[SumOfShapeCode]
)
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The syntax for 'SUMX' is incorrect. (DAX(VAR MaxRevision = MAX('PivCouplers'[A-schedule_revision_numbers])SUMX( FILTER( PivCouplers, CONTAINSSTRING(('PivCouplers'[shape_code]),"m") && 'PivCouplers'[A-schedule_revision_numbers] = MaxRevision ),[SumOfShapeCode] ))).
Hi @JL0101
Return is missing from your formula, so please try this:
VAR MaxRevision =
MAX ( 'PivCouplers'[A-schedule_revision_numbers] )
RETURN
SUMX (
FILTER (
PivCouplers,
CONTAINSSTRING ( ( 'PivCouplers'[shape_code] ), "m" )
&& 'PivCouplers'[A-schedule_revision_numbers] = MaxRevision
),
[SumOfShapeCode]
)
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @JL0101,
I guess you should try using "&&" as AND, like: SUMX ( FILTER ( Table, CONDITION_1 && CONDITION_2 ), [Measure or Column] ).
Best Regards,
Alexander
User | Count |
---|---|
21 | |
14 | |
11 | |
8 | |
5 |
User | Count |
---|---|
24 | |
22 | |
20 | |
15 | |
10 |