Forum Discussion

TytlerJaxon's avatar
TytlerJaxon
Frequent Visitor
8 years ago
Solved

Measure to include current selection and rows above and below dynamically

I am trying to create a soltution in order to dynamically select rows of data whenever I select a certain country, I also want to show the next three highest and lowest countries on a line chart visu...
  • TomMartens's avatar
    TomMartens
    8 years ago

    Hey Mark,

     

    the pbix file attached to this post (I'm sorry for the confusion, but maybe I will stick to onedrive links instead of fileuploads because they do not update automatically :-)) now contains another unrelated table (Years unrelated).

    Basically the change was not that big, instead of using the SUM OF ALL YEARS, now I use the AMOUNT OF THE SELECTED YEAR to determine the ranking.

     

    There are two new measures:

    • Selected Year
      Just contains the value of the selected year

    • SUM Amount by Selected Year
      Calculates the Amount for the selected year

    I adjusted the measure "rank Countries", it now uses the measure "SUM Amount by Selected Year", I also added the "old" measure" this is now called "rank Countrires All Years" for comparison reasons, but is seems that the ranking for all years equals the ranking for one paricular year, maybe my calculation is wrong, or it's the data :-)

     

    Please provide Feedback if my adjustments provide the solution you require, if not, can you please provide feedback, how to check this, based on the data you provided.

     

    Regards,

    Tom