Forum Discussion

tvm_analyst's avatar
tvm_analyst
Frequent Visitor
6 years ago
Solved

Static KPI target

I have this measure that shows the % of Windows systems that have critical vulnerabilities patched within 30 days.

 

windows_asset_goal = 

var MEASURE_VALUE = CALCULATE(DISTINCTCOUNT('public fact_asset_vulnerability_finding_date'[asset_id]), 'public dim_asset'[os_family] = "Windows", 'public dim_vulnerability'[dlx_severity] = "Critical", 'public fact_asset_vulnerability_finding_date'[status] = "Closed", 'public fact_asset_vulnerability_finding_date'[days_known] <= 30)

var BASELINE_VALUE = CALCULATE(DISTINCTCOUNT('public fact_asset_vulnerability_finding_date'[asset_id]), 'public dim_asset'[os_family] = "Windows")

RETURN

DIVIDE(MEASURE_VALUE, BASELINE_VALUE)

 

The result is shown as a % of the grand total in the KPI visual.

The target measure is a static value.

 

windows_asset_goal_target = 0.95

 

The issue is when I add the target measure to the visual, it returns blank for the primary measure.  

Any idea what is going on here?

  • Thank you all for your help on this topic.  The issue had to do with the static goal, the visual was creating a line at .95 for every date, even if the date did not include the values being measured.  Changing "goal_target_windows = 0.95" to the measure below fixed the problem. 

    __goal_target_windows = 
    IF('public fact_asset_vulnerability_finding_date'[__windows_os_goal] > 0.00, 0.95, BLANK())
    //0.95

     Thanks.

5 Replies

  • JarroVGIT's avatar
    JarroVGIT
    Resident Rockstar

    Try changing the datatype of the target measure to percentage:

     

    Kind regards

    Djerro123

    -------------------------------

    If this answered your question, please mark it as the Solution. This also helps others to find what they are looking for.

    Keep those thumbs up coming! 🙂

    • tvm_analyst's avatar
      tvm_analyst
      Frequent Visitor

      Thanks for the quick response.  Unfortunately I get the same issue.  I played around different datatypes for each of the measures, but nothing changes.

      • v-lid-msft's avatar
        v-lid-msft
        Community Support

        Hi JarroVGIT ,

         

        Sorry for that, but we cannot reproduce this issue on Power BI Desktop(December 2019), could you please use "See Data" to verify if the measure calculte the right value? Please don't have any Confidential Information or Real data in your reply.

         

         


        Best regards,

         

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    Hi tvm_analyst ,

     

    Have your issue be resolved?Could you please provide more details about it If it still not be soleved? Please don't have any Confidential Information or Real data in your reply.

     


    Best regards,

     

    • tvm_analyst's avatar
      tvm_analyst
      Frequent Visitor

      Thank you all for your help on this topic.  The issue had to do with the static goal, the visual was creating a line at .95 for every date, even if the date did not include the values being measured.  Changing "goal_target_windows = 0.95" to the measure below fixed the problem. 

      __goal_target_windows = 
      IF('public fact_asset_vulnerability_finding_date'[__windows_os_goal] > 0.00, 0.95, BLANK())
      //0.95

       Thanks.