Forum Discussion

ek2112's avatar
ek2112
Advocate II
8 years ago

Dynamic calculation based on slicer selection

I have two tables, 'Work Details' and 'Rate' and linked by 'Name' column. Each employee has their own hourly rates in the 'Rate' table's 'Rate' column.

 

I have additional columns in the Rate table - Rate 2, Rate 3 and Rate 4 - with different rates for each employee as shown below.

 

Is there a way I can display a slicer with just 'Rate', 'Rate 2' , 'Rate 3' and 'Rate 4' in the drop down and trigger calculations in related columns of the 'Work Details' table (like 'Daily Emp Cost' column) that currently points to 'Rate' column of the 'Rate' table, as a What if scenario? I tried with HASONEVALUE function, but could not wrap my head around it. Thanks for your help.

 

Here is the pbix file.

 

Rate table:

 

Work details table:

 

 

 

18 Replies

  • RMDNA's avatar
    RMDNA
    Solution Sage

    ek2112,

     

    Can you provide a visual of your expected end result? I know how to do this, I just need to see what you want.

    • ek2112's avatar
      ek2112
      Advocate II

      RMDNA

       

      Thanks for looking into this. Here is how I envision the expected result (I mocked this up in Excel):

       

       

       

       

       

      • RMDNA's avatar
        RMDNA
        Solution Sage

        Very helpful - if that's fabricated or anonymous data, it'd be useful if you could upload it to Dropbox/OneDrive/etc. and share the xlsx directly.