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

View all the Fabric Data Days sessions on demand. View schedule

Reply
romovaro
Responsive Resident
Responsive Resident

COUNTA Dax function

 

Hello

 

I need to create a formula counting for CID....How many contains Task "Partner Acknowledgement....." and have a schedule date

 

Tried with this one.... but 

Tasks with GLD & Closed = CALCULATE(COUNTA(CELERGO_12062021V1[SCHEDULED]),CELERGO_12062021V1[TASK]="partner Acknowledgement")..... but the problem is that "parnter Acknowledgment changes for every row" I need to use the formula "contains..." but I am not able to do it.
 
 
ANd then I need to answer the same question but with the task status CLosed
 
Tasks with GLD & Closed = CALCULATE(COUNTA(CELERGO_12062021V1[SCHEDULED]),                     (Need to use the contain formula for the "partner Acknowledgment).......and CELERGO_12062021V1[TASK_STATUS]="Closed")

 

CLIENT_NAMECIDINSTANCE_NUMBERTASKTASK_STATUSSCHEDULED
Client A3802491042784Partner Acknowledgement - 991342 - 380249BE01Received04-jul-22
Client B119421182224Partner Acknowledgement - 1182411 - 381229Received31-ene-22
Client C3803101122325Partner Acknowledgement - 1107560 - 380310GB01Received01-mar-22
Client E110211186659Partner Acknowledgement - 1186229 - 381236Received 
Client D10002481163652Partner Acknowledgement - 1160101 - 1000248FR01Received 
Client D10002481164153Partner Acknowledgement - 1160101 - 1000248DE01Closed02-may-22
Client D10002481164154Partner Acknowledgement - 1160101 - 1000248GB01Closed02-may-22


Thanks

3 ACCEPTED SOLUTIONS
Samarth_18
Community Champion
Community Champion

Hi @romovaro ,

You can try below code:-

Tasks with GLD & Closed =
CALCULATE (
    COUNTA ( CELERGO_12062021V1[SCHEDULED] ),
    CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" )
        && CELERGO_12062021V1[TASK_STATUS] = "Closed"
)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

@romovaro , Just small correction it should be like this:-

Total Tasks =
CALCULATE (
    COUNTA ( CELERGO_12062021V1[TASK] ),
    CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" )
)

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

If you want to include in same code then you can use this code:-

 

Tasks Pre Engagement Received =
VAR result =
    CALCULATE (
        COUNT ( CELERGO_12062021V1[CLIENT_NAME] ),
        FILTER (
            CELERGO_12062021V1,
            CELERGO_12062021V1[TASK]
                IN { "Pre Engagement Process", "IPM HandOff" }
                && CELERGO_12062021V1[TASK_STATUS] IN { "Closed", "Open" }
        )
    )
RETURN
    IF ( ISBLANK ( result ), 0, result )

 

and if you need seperate one then below would be the code:-

 

Tasks Pre Engagement Received =
VAR result =
    CALCULATE (
        COUNT ( CELERGO_12062021V1[CLIENT_NAME] ),
        FILTER (
            CELERGO_12062021V1,
            CELERGO_12062021V1[TASK] = "IPM HandOff"
                && CELERGO_12062021V1[TASK_STATUS] = "Open"
        )
    )
RETURN
    IF ( ISBLANK ( result ), 0, result )

 

 

@romovaro  You can ask as many question you want. 🙂

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

7 REPLIES 7
romovaro
Responsive Resident
Responsive Resident

HI Samarth,

 

Thanks a lot. I just had a meeting with management and below the final requirements...

 

I need to use the 3 formulas you gave me before but add an extra filter (Task = "IPM HandOff) and Task Status Closed

 

1) - Total Tasks = CALCULATE ( COUNTA ( CELERGO_12062021V1[TASK] ), CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" ) )+Extra filter

Showing Total of tasks that contains the string “Partner Acknowledgement” and have task “IPM HandOff” closed.

 

2) - Partner Acknowledgment with GLD = CALCULATE ( COUNTA ( CELERGO_12062021V1[SCHEDULED] ), CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" )) + Extra Filter

Showing Total of tasks that contains the string “Partner Acknowledgement” , have a schedule date and have task “IPM HandOff” closed.

 

Partner Acknowledgment with GLD & Closed = CALCULATE ( COUNTA ( CELERGO_12062021V1[SCHEDULED] ), CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" ) && CELERGO_12062021V1[TASK_STATUS] = "Closed" ) + Extra Filter

Showing Total of tasks that contains the string “Partner Acknowledgement” and task status Closed, have a schedule date and have task “IPM HandOff” closed.

 

Checked some previous forums and tried with your formulas but something is not working.

 

Total Tasks3 = CALCULATE ( COUNTA ( CELERGO_12062021V1[TASK] ), CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement", FILTER ( CELERGO_12062021V1, CELERGO_12062021V1[TASK] = "IPM HandOff" && CELERGO_12062021V1[TASK_STATUS] = "CLosed" ) ) RETURN IF ( ISBLANK ( result ), 0, result )
 

 

 

and last one (is it possible?)

I need to count all the tasks that have Task= Pre engagement process (Closed & received) and the IPM Handoff task (in the same column) Received...or missing (sometimes, the field IPM Handoff is not appearing...)

 

Pre Engagment needs to show all....and IPM HandOFF only the ones with Task_status Received...but sometimes the IPM HandOff is missing...any idea how to calculate that?

 

Tasks Pre Engagement Received 2 = VAR result = CALCULATE ( COUNT ( CELERGO_12062021V1[CLIENT_NAME] ), FILTER ( CELERGO_12062021V1, CELERGO_12062021V1[TASK] IN { "Pre Engagement Process", "IPM HandOff" } && CELERGO_12062021V1[TASK_STATUS] IN { "Closed", "Received" } ) ) RETURN IF ( ISBLANK ( result ), 0, result )

 

Final requirements... Thanks for everything

 

Robert

romovaro
Responsive Resident
Responsive Resident

Hi Samarth

 

last question for today 

 

If I want to calculate the ones that are 

Task = Pre Engagement Process & Task Status = Closed

and the ones that are:

task = IPM HandOff and Task Status = Open

 

Tasks Pre Engagement Received = VAR result = CALCULATE ( COUNT ( CELERGO_12062021V1[CLIENT_NAME] ), FILTER ( CELERGO_12062021V1, CELERGO_12062021V1[TASK] = "Pre Engagement Process" && CELERGO_12062021V1[TASK_STATUS] = "Closed" ) ) RETURN IF ( ISBLANK ( result ), 0, result )
 
and now I need to include task = IPM HandOff and Task Status = Open
 
I appreciate all your help

If you want to include in same code then you can use this code:-

 

Tasks Pre Engagement Received =
VAR result =
    CALCULATE (
        COUNT ( CELERGO_12062021V1[CLIENT_NAME] ),
        FILTER (
            CELERGO_12062021V1,
            CELERGO_12062021V1[TASK]
                IN { "Pre Engagement Process", "IPM HandOff" }
                && CELERGO_12062021V1[TASK_STATUS] IN { "Closed", "Open" }
        )
    )
RETURN
    IF ( ISBLANK ( result ), 0, result )

 

and if you need seperate one then below would be the code:-

 

Tasks Pre Engagement Received =
VAR result =
    CALCULATE (
        COUNT ( CELERGO_12062021V1[CLIENT_NAME] ),
        FILTER (
            CELERGO_12062021V1,
            CELERGO_12062021V1[TASK] = "IPM HandOff"
                && CELERGO_12062021V1[TASK_STATUS] = "Open"
        )
    )
RETURN
    IF ( ISBLANK ( result ), 0, result )

 

 

@romovaro  You can ask as many question you want. 🙂

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

romovaro
Responsive Resident
Responsive Resident

Thanks 🙂

Samarth_18
Community Champion
Community Champion

Hi @romovaro ,

You can try below code:-

Tasks with GLD & Closed =
CALCULATE (
    COUNTA ( CELERGO_12062021V1[SCHEDULED] ),
    CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" )
        && CELERGO_12062021V1[TASK_STATUS] = "Closed"
)

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

HI Samarth,,

 

And if I just want to count all Partner Acknowledgment (No mather if a Schedule or not): Just to get the total of tasks.

Tring the Contain formula with count.... :s

 

Total Tasks = COUNTA(CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" ))

 

@romovaro , Just small correction it should be like this:-

Total Tasks =
CALCULATE (
    COUNTA ( CELERGO_12062021V1[TASK] ),
    CONTAINSSTRING ( CELERGO_12062021V1[TASK], "Partner Acknowledgement" )
)

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors