Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello Comunity,
I have the folllowing DAX code that is working perfect but would like it in Power Query code. I a more familiar with DAX that's why I had no sucess.
Coincides = VAR ManualString = SUBSTITUTE ( 'Table'[Manual Serial], " ", "_" ) VAR Length1 = COALESCE ( LEN ( ManualString ), 1 ) VAR T1 = GENERATESERIES ( 1, Length1, 1 ) VAR T2 = SELECTCOLUMNS ( T1, "@Item1", MID ( ManualString, [Value], 1 ) ) VAR T3 = GROUPBY ( T2, [@Item1], "@Count1", COUNTX ( CURRENTGROUP ( ), 1 ) ) VAR CorrectString = SUBSTITUTE ( 'Table'[Correct Serial], " ", "_" ) VAR Length2 = COALESCE ( LEN ( CorrectString ), 1 ) VAR T4 = GENERATESERIES ( 1, Length2, 1 ) VAR T5 = SELECTCOLUMNS ( T4, "@Item2", MID ( CorrectString, [Value], 1 ) ) VAR T6 = GROUPBY ( T5, [@Item2], "@Count2", COUNTX ( CURRENTGROUP ( ), 1 ) ) RETURN SUMX ( T6, VAR T7 = FILTER ( T3, [@Item1] = [@Item2] ) VAR Count1 = MAXX ( T7, [@Count1] ) VAR Count2 = [@Count2] RETURN MIN ( Count1, Count2 ) )
Thank you
Solved! Go to Solution.
Hi @RIBUZ ,
Please try this custom colum.
List.Count(List.Intersect({Text.ToList([Manual Serial]),Text.ToList([Correct Serial])}))
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Hi @RIBUZ ,
Please try this custom colum.
List.Count(List.Intersect({Text.ToList([Manual Serial]),Text.ToList([Correct Serial])}))
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.