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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi everyone
I modified the formula from the following thread: Solved: Re: CountIf with Group by in Power Query - Microsoft Power BI Community for my use case below.
I'm trying to group by all the publications (count total publications) but also count the number of values where Clicked = 1. It did return the results but I wasn't sure if it's working correctly. Can you confirm?
= Table.Group(Table.SelectRows(Table.SelectColumns(#"External contacts only",{"OnePlace__Publication__c","Clicked__c"}),each [Clicked__c]=1), {"OnePlace__Publication__c"}, {{"Count Clicked__c", each Table.RowCount(_), type number}})
Thank you,
Kara
Solved! Go to Solution.
Hi @Anonymous ,
As tested here,seems there is some problem,the result is not correct,I modify the M codes as below:
= Table.AddColumn(#"Changed Type", "Custom", each Table.RowCount(Table.SelectRows(#"Changed Type",(x)=>x[Category]=[Category] and x[Click]=1)))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Hi @Anonymous ,
As tested here,seems there is some problem,the result is not correct,I modify the M codes as below:
= Table.AddColumn(#"Changed Type", "Custom", each Table.RowCount(Table.SelectRows(#"Changed Type",(x)=>x[Category]=[Category] and x[Click]=1)))
And you will see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my reply as a solution!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.