Forum Discussion

tvm_analyst's avatar
tvm_analyst
Frequent Visitor
7 years ago
Solved

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...
  • sturlaws's avatar
    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