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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sharpedogs
Advocate II
Advocate II

True/False column with blanks - how to count the blanks

Hi, 

I have a table with two seperate columns that are both True/False. But there are also blanks in those columns. I want to calcualte the number of rows in both columns where both of them have a blank. 

 

A sample table below. I want to return a count of 1, because Jack has a blank in both columns. 

 

Users     Has Exchange    Has OneDrive
Bob               TRUE             TRUE
Jack
Sam              FALSE            False
Dave             TRUE

2 ACCEPTED SOLUTIONS
kentyler
Solution Sage
Solution Sage

It seems like this might be a good case for a calculated column

both.PNG

 

I'm a personal Power Bi Trainer I learn something every time I answer a question

The Golden Rules for Power BI

  1. Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
  2. Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
  3. Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
  4. Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result  to check on your steps along the way.




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

az38
Community Champion
Community Champion

Hi @sharpedogs 

try a column

Column = calculate(countrows('Table');
FILTER(ALL('Table');ISBLANK('Table'[Has Exchange]) && ISBLANK('Table'[Has OneDrive]))
)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

You can create a measure using the SUMX iterator.

 

demo.png

az38
Community Champion
Community Champion

Hi @sharpedogs 

try a column

Column = calculate(countrows('Table');
FILTER(ALL('Table');ISBLANK('Table'[Has Exchange]) && ISBLANK('Table'[Has OneDrive]))
)

 

do not hesitate to give a kudo to useful posts and mark solutions as solution

LinkedIn


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
kentyler
Solution Sage
Solution Sage

It seems like this might be a good case for a calculated column

both.PNG

 

I'm a personal Power Bi Trainer I learn something every time I answer a question

The Golden Rules for Power BI

  1. Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
  2. Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
  3. Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
  4. Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result  to check on your steps along the way.




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors