Forum Discussion

LiaR's avatar
LiaR
Frequent Visitor
5 years ago
Solved

Dynamically update calculated column values with slicer

Hello everyone, I've got the problem with setting up slicer and modifying calculated column 

 

What am I trying to achieve -  

Modify the line chart with slicer's value. 

 

How values for the chart are calculated currently - 

 

Result =if(B = "Name", (Val1-Val2)/(Conval 1 * (conval2 – conval3 * X)) / 10, 1) 

 

Where: 

Val 1 and Val 2 – calculated columns 

Conval 1: 3 – Measures with 1 value 

X - to be variable, currently it is constant value 

 

Example in excel (marked the variable with yellow) 

 

 

I have checked this post already, but it does not work for me - https://community.powerbi.com/t5/Desktop/Slicer-Value-in-Column-Formula/td-p/214892 

 

Any ideas? 

  • Hello,

     

    I have solved the issue with the following steps:

    (refers to the example formula mentioned in the original post)

     

    1. I have calculated the difference between Val1 and Val2 as seperate column in table;

    2. Used 'Values()' to convert it into measurement

    3. Corrected original formula to use: Calculate (Divide (), type in {value}*) and created new measure

    4. It worked. This was done for each type, and all measures were added to chart separetly.

     

    Although it has some limitations towards visualization, by the end of the day it works. Hopefully it might help someone 🙂 

     

    * used for filtering through types

3 Replies

  • CNENFRNL's avatar
    CNENFRNL
    Icon for Community Champion rankCommunity Champion

    Hi, LiaR , calculated columns are static and never response to any change of slicer or any other viz.

    • LiaR's avatar
      LiaR
      Frequent Visitor

      Is there any way to make measure instead of calculated column to have the same outcome? so i would have a list of values within the measure?

  • LiaR's avatar
    LiaR
    Frequent Visitor

    Hello,

     

    I have solved the issue with the following steps:

    (refers to the example formula mentioned in the original post)

     

    1. I have calculated the difference between Val1 and Val2 as seperate column in table;

    2. Used 'Values()' to convert it into measurement

    3. Corrected original formula to use: Calculate (Divide (), type in {value}*) and created new measure

    4. It worked. This was done for each type, and all measures were added to chart separetly.

     

    Although it has some limitations towards visualization, by the end of the day it works. Hopefully it might help someone 🙂 

     

    * used for filtering through types