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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sowjanya_09
Frequent Visitor

count for sting tupe colums

Sowjanya_09_1-1651511012028.png

I have Help desk tickets data having status description colmn.

I am trying to create cards using new column

Opened Tickets = IF((HD_Ticket[StatusDescription] <> "Closed") &&  (HD_Ticket[StatusDescription] <> "Duplicate"), 0, 1)

but its not working .

My requirement is Open tickets are the tickets that are  not equal to closed , not equal to duplicate.

I want count for those tickets.

Is there is any way to do this?

1 ACCEPTED SOLUTION
Sowjanya_09
Frequent Visitor

This one worked for me

CuntDuplicate = CALCULATE( COUNTROWS (HD_Ticket), HD_Ticket[StatusDescription] = "Duplicate Entry"  )

CuntnotClosed = CALCULATE( COUNTROWS (HD_Ticket), HD_Ticket[StatusDescription] <> "Closed"  )

Opened = HD_Ticket[CuntnotClosed]-HD_Ticket[CuntDuplicate]

View solution in original post

4 REPLIES 4
Sowjanya_09
Frequent Visitor

This one worked for me

CuntDuplicate = CALCULATE( COUNTROWS (HD_Ticket), HD_Ticket[StatusDescription] = "Duplicate Entry"  )

CuntnotClosed = CALCULATE( COUNTROWS (HD_Ticket), HD_Ticket[StatusDescription] <> "Closed"  )

Opened = HD_Ticket[CuntnotClosed]-HD_Ticket[CuntDuplicate]

v-easonf-msft
Community Support
Community Support

Hi, @Sowjanya_09 

If your problem has been solved, please accept the helpfu reply as solution to close this thread.

If you still need help, please share more details.

Best Regards,
Community Support Team _ Eason

speedramps
Super User
Super User

If there is one row per ticket then use this solution

 

Open Tickets =

VAR mysubset = FILTER(HD_Ticket, 
HD_Ticket[StatusDescription] <>"Closed") && 
(HD_Ticket[StatusDescription] <> "Duplicate")
RETURN

COUNTROWS(mysubset)

If there are multiple row per ticket then use this solution

 

Open Tickets =

VAR mysubset = FILTER(HD_Ticket, 
HD_Ticket[StatusDescription] <>"Closed") && 
(HD_Ticket[StatusDescription] <> "Duplicate")
RETURN
CALCULATE(
DISTINCTCOUNT(HD_Ticket[ticketid]),

mysubset
)

 

I helped you so please kindley help me.

Click the thumbs up and Accept as Solution to leave kudos !

SpartaBI
Community Champion
Community Champion

@Sowjanya_09 need more info about your data but just by looking at your code and the fact you are trying to create a measure let's try a quick win:

IF(SELECTEDVALUE(HD_Ticket[StatusDescription]) <> "Closed") &&  SELECTEDVALUE(HD_Ticket[StatusDescription]) <> "Duplicate"), 0, 1)


In case it answered your question please mark this as a solution for community visibility. Appreciate Your Kudos 🙂

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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