cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dbk58 Frequent Visitor
Frequent Visitor

Nested Parameters in DAX expression in Table Visual

Hi. I'm trying to create a table that uses several editable daily rates for several job positions in order to compute total costs. The Positions are different job classes, the levels within positions are the same from a structural point of view, but the rates for the positions vary between the Positions.

 

I've created fixed decimal parameters for each specific rate, and then tried to use them in an expression like this:

 

Rate = switch(trim('TimeCard'[Level]),
  "Position1",
   switch(trim('TimeCard'[Classification]),
    "P1_Level1",'P1_Level1_Param_Rate'[P1_Level1_Param_Rate Value],
    "P1_Level2",'P1_Level2_Param_Rate'[P1_Level2_Param_Rate Value],
    "P1_Level3",'P1_Level3_Param_Rate'[P1_Level3_Param_Rate Value],
    "P1_Level4",'P1_Level4_Param_Rate'[P1_Level4_Param_Rate Value],
   ),
  "Position2",
    switch(trim('TimeCard'[Classification]),
     "P2_Level1",'P2_Level1_Param_Rate'[P2_Level1_Param_Rate Value],
     "P2_Level2",'P2_Level2_Param_Rate'[P2_Level2_Param_Rate Value],
     "P2_Level3",'P2_Level3_Param_Rate'[P2_Level3_Param_Rate Value],
     "P2_Level4",'P2_Level4_Param_Rate'[P2_Level4_Param_Rate Value],
   )
)
 
If I put a simple card on the page and populate it with the What If param value for one of the levels/positions, it updates as expected when I make a change to the parameter. But the values in the table never change. If I try to use this Rate in my table, where I multiply the hours worked by the Rate to compute a total cost, the rate never updates when I change the parameter value. 
 
The What If parameters are defined like (for Level01) as:
 
P1_Level01= GENERATESERIES(30, 40, 0.01)
P1_Level01 Rate Value = SELECTEDVALUE('P1_Level1_Param_Rate'[P1_Level1_Param_Rate Value],35)
 
Is this possible to do? 
1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Nested Parameters in DAX expression in Table Visual

Hi @dbk58 ,

Current power bi not support to create dynamic calculated table/column based on filter/slicer.

Measure is a expression for calculate, it works on data view level(visual, filter, measure, slicer) which generated from data model tables and it will been affected by its row contents filter.

They are stored in different data levels and you can't use child level(data view) to affect its parent level(data model: table, column, calculated column/table).

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Nested Parameters in DAX expression in Table Visual

Hi @dbk58 ,

Current power bi not support to create dynamic calculated table/column based on filter/slicer.

Measure is a expression for calculate, it works on data view level(visual, filter, measure, slicer) which generated from data model tables and it will been affected by its row contents filter.

They are stored in different data levels and you can't use child level(data view) to affect its parent level(data model: table, column, calculated column/table).

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, please consider Accept it as the solution to help the other members find it more quickly
Learning resources: Power BI

View solution in original post

dbk58 Frequent Visitor
Frequent Visitor

Re: Nested Parameters in DAX expression in Table Visual

Well that's unfortunate. Essentially these are just constants that get adjusted once per year. 

 

Oh well - we'll have to look at generating a table with these rates for each position. 

 

Thanks.

Helpful resources

Announcements
Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors