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
king2005r
Helper III
Helper III

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 III
Helper III

Hi @v-yalanwu-msft 

any idea please. 

king2005r
Helper III
Helper III

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
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.