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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
robhel
Helper I
Helper I

Count based on 2 columns a blank and not blank

Sorry, newbie PBI question that is now doing my head in and need guru's advice.......I am trying to count the number of rows based on two date columns 

Cnt ActSt Blank ActComNot =
CALCULATE(
COUNTROWS('Data'),
FILTER(
'Data',
(ISBLANK('Data'[START_ACT]
&& NOT(ISBLANK('Data'[COMP_ACT]))))

 

Appreciate any help here

1 ACCEPTED SOLUTION
Stachu
Community Champion
Community Champion

you didn't close the bracket in first ISBLANK

Cnt ActSt Blank ActComNot = 
CALCULATE(
COUNTROWS('Data'),
FILTER(
'Data',
ISBLANK('Data'[START_ACT])
&& NOT(ISBLANK('Data'[COMP_ACT]))))

this formula whould work as well

Cnt ActSt Blank ActComNot = 
CALCULATE(
    COUNTROWS('Data'),
    ISBLANK('Data'[START_ACT]),
    NOT(ISBLANK('Data'[COMP_ACT]))
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

View solution in original post

2 REPLIES 2
Stachu
Community Champion
Community Champion

you didn't close the bracket in first ISBLANK

Cnt ActSt Blank ActComNot = 
CALCULATE(
COUNTROWS('Data'),
FILTER(
'Data',
ISBLANK('Data'[START_ACT])
&& NOT(ISBLANK('Data'[COMP_ACT]))))

this formula whould work as well

Cnt ActSt Blank ActComNot = 
CALCULATE(
    COUNTROWS('Data'),
    ISBLANK('Data'[START_ACT]),
    NOT(ISBLANK('Data'[COMP_ACT]))
    )


Did I answer your question? Mark my post as a solution!
Thank you for the kudos 🙂

So simple and saved me so much time - you are a superhero Stachu

Helpful resources

Announcements
ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.