Forum Discussion

PaulKraemer's avatar
PaulKraemer
Advocate II
1 year ago
Solved

Referencing a user controlled variable in a measure

Hi,   The link below is to a .pbix file with a single matrix visualization that includes a Measure (PctDiff) that computes the percentage difference between an Actual Value and a Target Value.  I h...
  • Deku's avatar
    Deku
    1 year ago

    File didn't open for me

     

    I create a table, and named the column Percentages.

     

    Percentage = GENERATESERIES(0, 100, 1)

     

    And a measure

     

    Target = 
    var percentage = SELECTEDVALUE( Percentage[Percentages] ) / 100
    RETURN
    SUM( 'Table'[Value] ) * percentage

     

    Add a slicer for the user to select from and add the measure a table.