cancel
Showing results for 
Search instead for 
Did you mean: 
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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors