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
prj102
Helper I
Helper I

Systems missing patches for multiple months

Need a bit of help.  I'm trying to find the best way to calculate if a system is missing patches from multiple months.  Consecutive and non-consecutive.  

 

I'm using SCCM to pull in patch information with patch status (compliant or not) and I'm hoping to create two columns that will look for patching missing from multiple months.  

 

Any ideas would be helpful.

 

 

Update - More info:

 

My patch info table looks something like this.  

 

machineidci_idstatusPatchDate
system1patch1compliant3/15/2019
system2patch1not compliant3/15/2019
system3patch1not compliant3/15/2019
system1patch2compliant2/13/2019
system2patch2not compliant2/13/2019
system3patch2compliant2/13/2019
system1patch3compliant1/9/2019
system2patch3compliant1/9/2019
system3patch3not compliant1/9/2019

 

 

I'm looking to create a calculated column that will tell me something like the following.

 

machineidstatus
system1compliant
system2missing consecutive months
system3missing multiple months

 

 

 

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @prj102 ,

 

In my opinion, I'd like to suggest you except function to compare with current list and full list. Can you please share some sample data with expect result?

 

Notice: do mask on sensitive data.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Updated with an example.

HI @prj102 ,

You can try to use following measure formula:

Measure =
VAR _statuscount =
    CALCULATE (
        COUNTA ( T1[status] ),
        FILTER ( ALLSELECTED ( T1 ), [status] = "compliant" ),
        VALUES ( T1[machineid] )
    )
VAR _datecount =
    COUNTROWS ( VALUES ( T1[PatchDate] ) )
RETURN
    IF (
        ISINSCOPE ( T1[machineid] ),
        IF (
            _statuscount = _datecount,
            "compliant",
            "Miss " & _datecount - _statuscount & " Patchs"
        )
    )

1.png

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

That's not really working.  Everything is coming back blank.  I had to change a bit to work with my data.  value 3 for status is compliant.

 

Measure = 
VAR _statuscount = 
    CALCULATE ( 
        COUNTA ( ComputerUpdate[status] ), 
        FILTER ( ALLSELECTED ( ComputerUpdate ), [status] = 3 ), 
        VALUES ( ComputerUpdate[machineid] ) 
    ) 
VAR _datecount = 
    COUNTROWS ( VALUES ( ComputerUpdate[PatchDate] ) ) 
RETURN 
    IF ( 
        ISINSCOPE ( ComputerUpdate[machineid] ), 
        IF ( 
            _statuscount = _datecount, 
            "compliant", 
            "Miss " & _datecount - _statuscount & " Patches" 
        ) 
    )

 

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.