Forum Discussion
king2005r
5 years agoHelper III
Vulnerabilities status report
Hi I have a table with monthly vulnerabilities, Plugin ID, and Host IP, I need to do the below measurement : 1- Get repeated monthly vulnerabilities 2- Get the count of the new vulnerabilities 3...
- 5 years ago
Hi king2005r ,
Create 2 calculated columns as below:
Repeated = var _previous=CALCULATE(MAX('Table'[Plugin ID]),FILTER('Table','Table'[Host]=EARLIER('Table'[Host])&&'Table'[Open Date]<EARLIER('Table'[Open Date])&&'Table'[Plugin ID]=EARLIER('Table'[Plugin ID]))) Return IF(_previous=BLANK(),"Not repeated","Repeated")Count of Plugin vulnerability = var _count=CALCULATE(COUNT('Table'[Plugin ID]),FILTER('Table','Table'[Plugin ID]=EARLIER('Table'[Plugin ID])&&'Table'[Host]=EARLIER('Table'[Host])&&'Table'[Open Date]<=EARLIER('Table'[Open Date]))) Return _countAnd you wil see:
For the related .pbix file,pls see attached.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
king2005r
5 years agoHelper III
Hi v-kelly-msft , thanks for the reply
If the today date is 1/1/2021
I expect something like the below table :
| Plugin ID | Host | Open Date | Repeated | Status | Count of Plugin vulnerability | Today |
| 10263 | 11.22.33.116 | 1-Aug-20 | Not repeated | Open | 1 | 1-Jan-21 |
| 10386 | 12.33.44.23 | 1-Aug-20 | Not repeated | Open | 1 | 1-Jan-21 |
| 10263 | 11.22.33.116 | 1-Sep-20 | repeated | Open | 1 | 1-Jan-21 |
| 10389 | 12.33.44.23 | 1-Sep-20 | Not repeated | Closed | 1 | 1-Jan-21 |
| 10244 | 11.22.33.66 | 1-Oct-20 | Not repeated | Open | 1 | 1-Jan-21 |
| 10347 | 12.33.44.23 | 1-Oct-20 | Not repeated | Open | 1 | 1-Jan-21 |
| 10244 | 11.22.33.66 | 1-Nov-20 | repeated | Open | 2 | 1-Jan-21 |
| 10347 | 12.33.44.23 | 1-Nov-20 | repeated | Open | 2 | 1-Jan-21 |
| 10263 | 11.22.33.116 | 1-Dec-20 | repeated | open | 2 | 1-Jan-21 |
| 10386 | 12.33.44.23 | 1-Dec-20 | repeated | open | 2 | 1-Jan-21 |
| 10263 | 11.22.33.116 | 1-Jan-21 | repeated | open | 3 | 1-Jan-21 |
| 10386 | 12.33.44.23 | 1-Jan-21 | repeated | open | 3 | 1-Jan-21 |
v-kelly-msft
5 years agoCommunity Support
Hi king2005r ,
Create 2 calculated columns as below:
Repeated =
var _previous=CALCULATE(MAX('Table'[Plugin ID]),FILTER('Table','Table'[Host]=EARLIER('Table'[Host])&&'Table'[Open Date]<EARLIER('Table'[Open Date])&&'Table'[Plugin ID]=EARLIER('Table'[Plugin ID])))
Return
IF(_previous=BLANK(),"Not repeated","Repeated")Count of Plugin vulnerability =
var _count=CALCULATE(COUNT('Table'[Plugin ID]),FILTER('Table','Table'[Plugin ID]=EARLIER('Table'[Plugin ID])&&'Table'[Host]=EARLIER('Table'[Host])&&'Table'[Open Date]<=EARLIER('Table'[Open Date])))
Return
_count
And you wil see:
For the related .pbix file,pls see attached.
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
- king2005r5 years agoHelper III
Thanks a lot v-kelly-msft