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
sullynivek
Frequent Visitor

count filter if contains text - measure

Hi all,

 

I have this measure that looks for closed work orders by a specified date i.e.

 

Closed = CALCULATE(COUNT(wkaw[cmpl_date]), USERELATIONSHIP(DateCalendar[Date],wkaw[cmpl_date]))

 

What I want to do is the following, the raw data consists of the work order number [wo] where there can be 3 different types of work orders; the different types start with 'C' , 'P' or 'T'. How can i filter so i can have 3 measures closed p jobs , closed c jobs and closed t jobs?

 

I have tried the following:

 

Closed C Jobs = CALCULATE(COUNTA(wkaw[cmpl_date]), FILTER('wkaw',FIND("C", wkaw[wo],,0)))

 

But this calculation for all 3 work orde types dont tally to the closed total amount.

 

Any help would be greatly appreciated

 

Thanks

 

Kevin

1 ACCEPTED SOLUTION
sullynivek
Frequent Visitor

For anyone that is interested the soluion is as follows:

 

CALCULATE(COUNT(wkaw[cmpl_date]), USERELATIONSHIP(DateCalendar[Date],wkaw[cmpl_date]), FIND("C", wkaw[wo],,0))

View solution in original post

1 REPLY 1
sullynivek
Frequent Visitor

For anyone that is interested the soluion is as follows:

 

CALCULATE(COUNT(wkaw[cmpl_date]), USERELATIONSHIP(DateCalendar[Date],wkaw[cmpl_date]), FIND("C", wkaw[wo],,0))

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.