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
Anonymous
Not applicable

Measure counting if two things are true in a row

Hi,

 

I have been trying to create a measure for myself to get a count showing me two things. The first is if a specific word exists in the datatable. The second being that a data column is not blank. Both things must be present in a row, and I can't seem to get this to work as it returns the wrong numbers, it seems like no matter what it concatenates the data not verifies both are true for each row. 

 

Below is a sample of the data and the measure i created to try and get what I am after.

 

Test Measure =
CALCULATE (
    COUNT('Combined Data'[Break-Fix Ticket Closed]),
    FILTER (
        ALLSELECTED('Combined Data'),
        SEARCH("SentinelOne", 'Combined Data'[Reasons],,0) && NOT(ISBLANK('Combined Data'[Break-Fix Ticket Closed]))))

 

Last Core CommOS NameOS DisplayVersionOS CurrentBuildReasonBreak-Fix TicketBreak-Fix Ticket OpenedBreak-Fix Ticket Closed
44,829.95Windows 11 Professional 6421H222,000EDR - SentinelOne 11/30/202212/2/2022
44,844.65Windows 11 Professional 6421H222,000EDR - Crowdstrike, EDR - SentinelOne   
44,813.72Windows 11 Professional 6421H222,000EDR - Crowdstrike, EDR - SentinelOne   
44,826.87Windows 10 Professional 64 18,363OS - Win10 21H2   
44,848.09Windows 10 Professional 64 18,363OS - Win10 21H2   
44,848.42Windows 10 Enterprise 6421H219,044EDR - Cisco AMP   

 

 

1 ACCEPTED SOLUTION
v-yetao1-msft
Community Support
Community Support

Hi @Anonymous 

Please correct your measure like this :

Test Measure = 
CALCULATE (
    COUNT('Combined Data'[Break-Fix Ticket Closed]),
    FILTER ('Combined Data',CONTAINSSTRING(MAX('Combined Data'[Reason]),"SentinelOne")=TRUE() && 'Combined Data'[Break-Fix Ticket Closed]<>BLANK()))

Then you will get a result like this :

Ailsamsft_0-1668755129227.png

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yetao1-msft
Community Support
Community Support

Hi @Anonymous 

Please correct your measure like this :

Test Measure = 
CALCULATE (
    COUNT('Combined Data'[Break-Fix Ticket Closed]),
    FILTER ('Combined Data',CONTAINSSTRING(MAX('Combined Data'[Reason]),"SentinelOne")=TRUE() && 'Combined Data'[Break-Fix Ticket Closed]<>BLANK()))

Then you will get a result like this :

Ailsamsft_0-1668755129227.png

 

Best Regards,
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Top Kudoed Authors