Forum Discussion
tvm_analyst
7 years agoFrequent Visitor
Calculating remediated vulnerabilities
I have 2 fact tables containing vulnerability data, a finding table and a finding_date table. The finding table is overwritten with the current findings after scans are run, the finding_date t...
- 7 years ago
hi tvm_analyst
you could try something like this:new table = ADDCOLUMNS ( SUMMARIZE ( 'finding_date', 'finding_date'[asset_id], 'finding_date'[vulnerability_id] ), "firstFoundDate", CALCULATE ( MIN ( 'finding_date'[date] ) ),
"lastFoundDate", CALCULATE ( Max ( 'finding_date'[date] ) ) )then, assuming that asset_id and vulnerability_id is unique in the finding-table, create a new column in the new table
isSolvedFlag = IF ( ISBLANK ( LOOKUPVALUE ( 'finding'[date], 'finding'[asset_id], 'new table'[asset_id], 'finding'[vulnerability_id], 'new table'[vulnerability_id] ) ), 1, 0 )and then you should be on you way
tvm_analyst
7 years agoFrequent Visitor
For some reason, adding .[Date] to the input for MIN/MAX was causing my issue. Removed it and everything seems to be working as intended. Thank you sturlaws !