Forum Discussion

tahechadv_2022's avatar
2 years ago
Solved

Conditional What-If

Hi guys,

 

I was making a budget dashboard and I tried as hard as I could to implement a conditional what-if but i couldn't.

 

Let me explain it:

I create the parameter and its range. Lets say 0 to 1 (0% to 100%).

 

I wanted to be able to enable the manager to change the percentual for a especific class WITHOUT altering the order classes.

Example:

 

CAT-A = 100

CAT-B = 10

CAT-C = 1

 

If the users select CAT-A and ajust the range to 10%, I would like it only to change CAT-A from 100 to 110, like this:

CAT-A = 110

CAT-B = 10

CAT-C = 1

 

I tried to use selectedvalue(), lookupvalue(), filter()... and none of them worked out.

 

The best I did was this measure:

But it just work if I wright down the "Conta", if I try to use selectedvalue() or lookupvalue() it does not work.

It that possible to create a dynamic What-If?

 

Total Cenário =
SUMX (
'Finanças TI',
IF (
'Finanças TI'[Conta] = "CAT-A",
('Finanças TI'[Valor_Bruto_CC] * 'Parameter '[Parameter  Value] + 'Finanças TI'[Valor_Bruto_CC]),
'Finanças TI'[Valor_Bruto_CC]
)
)

3 Replies

  • Hi tahechadv_2022 you can create a new table in which you add a rank for each category and then link to table to your data. You should be able to sort your column using this new table and keep the order even if the value change. 

    Does that answer your question ? 

    • tahechadv_2022's avatar
      tahechadv_2022
      Helper II

      No, 

       

      I want to keep the sum of all categories, except the category selected in the VAR ContaSelecionada.

      Like this: