Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
This is my fact table.
Name table
name | age | id |
male | 11 | 1 |
female | 13 | 2 |
male | 11 | 1 |
female | 13 | 2 |
male | 11 | 1 |
female | 13 | 2 |
male | 56 | 1 |
This is my dimension table:
Type table
type | Type id |
male | 1 |
female | 2 |
Actually, I want to know number of male in one card visual and no of female in one card visual .So Can I know DAX measure for this. I have tried a lot.
For example
.
Solved! Go to Solution.
@AtchayaP create a relationship using the type id column in both the tables and it will create one to many relationship, one on dimensions ide and many on fact side, add following measures, and then uses these measures in the card visual
Total Count = COUNTROWS ( FactTable )
Male Count = CALCULATE ( [Total Count], DimTable[Type] = "Male" )
Female Count = CALCULATE ( [Total Count], DimTable[Type] = "Female" )
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@AtchayaP Yes, you can surely use that, nothing wrong with it.
Do subscribe to my YouTube channel, you will find interesting videos on Power BI.
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@AtchayaP create a relationship using the type id column in both the tables and it will create one to many relationship, one on dimensions ide and many on fact side, add following measures, and then uses these measures in the card visual
Total Count = COUNTROWS ( FactTable )
Male Count = CALCULATE ( [Total Count], DimTable[Type] = "Male" )
Female Count = CALCULATE ( [Total Count], DimTable[Type] = "Female" )
Learn about conditional formatting at Microsoft Reactor
My latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thank you @parry2k
Male Count = CALCULATE ( [Total Count], DimTable[Typeid] = 2 ) Can I use this method. I am getting same visual. But Could you suggest? which is appropriate meaaure to use?
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.