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.
You would think by now I would know how to do this but alas I have struck out. Can you help?
Trying to group the values in column "Popeyes" into two groups: >0 and 0.
Expected values for Count of Stores
>0 = 247
0 = 739
What is the DAX to do this?
Solved! Go to Solution.
Hi @Quinnie2017
You can create a calculated column as follows:
Column = SWITCH ( TRUE () , 'Table'[Popeyes] = 0 , 739, 247 )
Basically, the formula says, if Popeyes column = 0 then return 739, otherwise, return 247 for everything else.
Also, make sure that you have Popeyes column set to Whole Number and not Text.
Hope this helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @Quinnie2017
You can create a calculated column as follows:
Column = SWITCH ( TRUE () , 'Table'[Popeyes] = 0 , 739, 247 )
Basically, the formula says, if Popeyes column = 0 then return 739, otherwise, return 247 for everything else.
Also, make sure that you have Popeyes column set to Whole Number and not Text.
Hope this helps 🙂
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias