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!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
Hi I have a data set below.
i have a number of entries for 1 id number - what i am trying to do is if the id number as top 30 entry then group that as Top30 and don't group the rest, but if there is no Top 30 in the entry then count it as other.
At the moment as you can see below my query is bring back every that is not a Top 30 as other. so even if i count its by distinct by the id i will be double count the entry.
i hope that makes sense please find below a screen shot of the data.
Thanks,
Solved! Go to Solution.
Hi @Billy_1979,
I think you should modify your M query as below:
if List.Contains([All Data][Sticker ID], "Top 30") then "Top30" else "Other"
I have made a simple test for your reference:
Please check the attached .pbix file for details.
Best Regards,
Qi
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!
Hi @Billy_1979 , Could you please try these
So i have grouped the data
Then i created the custom column,
When i do this im getting alot of duplicate entries.
i think i may have missed a step or the logic i have put in is incorrect.
Thanks
Hi @Billy_1979 , Instead of category put your required column Sticker id or any other
eg : if List.Contains([All Data][Sticker ID], "Top30") then "Top30" else "Other"
Hi @Billy_1979,
I think you should modify your M query as below:
if List.Contains([All Data][Sticker ID], "Top 30") then "Top30" else "Other"
I have made a simple test for your reference:
Please check the attached .pbix file for details.
Best Regards,
Qi
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!
This Solution worked perfectly thanks for your help. @Anonymous