Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |