Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Count blank

Hello

Hope someone can help me. I have two different tables connected by account number 

Table Accounts shows all my clients name.  

Table EQ_ Key Facts shows the number of facts we know about clients.

 

Erika16_0-1709650383828.png

1. I need a measure to work out how many clients do not have any key facts, I cannot do this directly on the key facts table as this will only show clients who have key facts. 

 

In this example, Dan + Puppu do not have key facts. 

 

 

2. I need groups for how many key facts we have per client and the groups need to be as follow:

  • 0
  • 1-2
  • 3-4
  • 5-6
  • 6-10
  • >10

 

Could anyone please help me? 

 

Many thanks!! 😀

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous 

 

I tested it with your sample.

 

Create a measure:

Measure = 
VAR _count = CALCULATE(COUNT('EQ_ Key Facts'[Key Facts]), FILTER('EQ_ Key Facts', [Key Facts] = MAX(Accounts[Accounts])))
VAR _result = IF(_count <> BLANK(), _count, 0)
RETURN
SWITCH(TRUE(),
_result = 0, "0",
_result = 1 || _result = 2, "1-2")

 

Output:

vxuxinyimsft_0-1709714156317.png

 

Is this the result you expect? If this is not the result you are looking for, please provide the result you are looking for in excel form so we can help you better.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

I tested it with your sample.

 

Create a measure:

Measure = 
VAR _count = CALCULATE(COUNT('EQ_ Key Facts'[Key Facts]), FILTER('EQ_ Key Facts', [Key Facts] = MAX(Accounts[Accounts])))
VAR _result = IF(_count <> BLANK(), _count, 0)
RETURN
SWITCH(TRUE(),
_result = 0, "0",
_result = 1 || _result = 2, "1-2")

 

Output:

vxuxinyimsft_0-1709714156317.png

 

Is this the result you expect? If this is not the result you are looking for, please provide the result you are looking for in excel form so we can help you better.

 

Best Regards,
Yulia Xu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Greg_Deckler
Community Champion
Community Champion

@Anonymous So like a calculated column in your Accounts table like: COUNTROWS(RELATED('Key Facts')) + 0  ?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler  I mention the tables to show that I cannot know the blanks on the key facts 

but I think something similat to this will work: 

 

Measure =
CALCULATE(
count(Account table [name]) +0,
EQ_Key_Facts[Comments] == BLANK()
)
 
but his returns all the accounts, no the ones that are blank 
 
Many thanks for getting back to me!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.