cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
king2005r
Helper II
Helper II

Vulnerabilities status report monthly (Help)

Dear All,

I hope you have a great day!

 

I have a table with monthly vulnerabilities report, Plugin ID, and Host IP, with solutions and the open date, I need to do the below measurement  :

2- Get the count of the new vulnerabilities

3- Any vulnerabilities that don't exist in the last month vulnerabilities consider as closed in all previous months 

4- Any vulnerabilities that exist in the last month result to be considered as open in all previous months

 

Example table : 

Aug/2020

Plugin IDHostOpen Date
1026311.22.33.1161/Aug/2020
1038612.33.44.231/Aug/2020

Sep/2020

Plugin IDHostOpen Date
1026311.22.33.1161/Sep/2020
1038912.33.44.231/Sep/2020

 

Oct/2020

Plugin IDHostOpen Date
1024411.22.33.661/Oct/2020
1034712.33.44.231/Oct/2020

 

 

 

Sample of the output :

Plugin IDHostOpen DateRepeatedStatusCount of Plugin vulnerabilityToday
1026311.22.33.1161-Aug-20Not repeatedOpen11-Jan-21
1038612.33.44.231-Aug-20Not repeatedOpen11-Jan-21
1026311.22.33.1161-Sep-20repeatedOpen21-Jan-21
1038912.33.44.231-Sep-20Not repeatedClosed11-Jan-21
1024411.22.33.661-Oct-20Not repeatedClosed11-Jan-21
1034712.33.44.231-Oct-20Not repeatedClosed11-Jan-21
1024411.22.33.661-Nov-20repeatedClosed21-Jan-21
1034712.33.44.231-Nov-20repeatedClosed21-Jan-21
1026311.22.33.1161-Dec-20repeatedopen31-Jan-21
1038612.33.44.231-Dec-20repeatedopen21-Jan-21
1026311.22.33.1161-Jan-21repeatedopen41-Jan-21
1038612.33.44.231-Jan-21repeatedopen31-Jan-21
4 REPLIES 4
king2005r
Helper II
Helper II

Hi @v-yalanwu-msft 

any idea please. 

king2005r
Helper II
Helper II

Up !

v-yalanwu-msft
Community Support
Community Support

Hi @king2005r ,

 

From your description, If you have three tables, you can first append them in power query.

v-yalanwu-msft_0-1619572473133.jpeg

Then create a column to output last month, next create a measure with swicth(), and finally count by Plugin ID.
the following formula to create a measure or column :
First: create a column:

lastmonth =
VAR _a = 'Table'[Plugin ID]
VAR _b = 'Table'[Open Date]
RETURN
MAXX ( FILTER ( 'Table', _a = [Plugin ID] && _b > [Open Date] ), [Open Date] )

v-yalanwu-msft_1-1619572531417.jpeg

Then create a measure:

Status =
SWITCH (
TRUE (),
MAX ( 'Table'[Open Date] ) = MINX ( ALL ( 'Table' ), [Open Date] ), "Open",
MONTH ( MAX ( 'Table'[Open Date] ) - MAX ( 'Table'[lastmonth] ) ) = 1, "Open",
"Close")

Last count: create a measure:

Count of Plugin vulnerability = var a= MAX('Table'[Open Date])
return COUNTROWS(FILTER(ALL('Table'),[Plugin ID]=MAX('Table'[Plugin ID])&&[Open Date]<=a))

The final output is shown below:

v-yalanwu-msft_2-1619572548511.png

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yalanwu-msft 

 

Thank you so much, i tried your solutions but all status become closed

Unfortunately, I expect that the problem is occurring because of that need to compare 2 cloumn (Plugin id, host name ) must be the same for the last month and prevous month (plugin id can be dublicated with other host name, but the host name will be uniq) to be open

 

lastmonth =
VAR _a = 'Table'[Plugin ID]
VAR _b = 'Table'[Open Date]
RETURN
MAXX ( FILTER ( 'Table', _a = [Plugin ID] && _b > [Open Date] ), [Open Date] )

 

 

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors