Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi everyone
I have a table CUSTOMER where there is a customer key that is a unique value and a list where that customer key is duplicated for each transaction the customer has done. I would like, in Power Query, to count the number of transactions per customer. Therefore I need to count the number of values in the list that are equal to the ID of the current row, for each row.
The reason I am not doing this in DAX is that I need this number to perform filtering on the table and eliminate some rows.
How can I do it? Thanks
Hi @Anonymous
you can create a custom column with this code, where "IDColumn" is the name of the column with the IDs and "ListColumn" the name of the column with the lists:
List.Count( List.Select ( [ListColumn], (inner)=> inner = [IDColumn] ) )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs
Cheers
This looks correct and works rapidly when creating the column in PowerQuery but it's extremely slow when applying the query change. Is it normal or should it work smoothly?
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.