Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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