Anonymous's avatar
Anonymous
Not applicable
9 years ago
Status:
Accepted

Calculated Columns Not refreshing when formula of referenced measures change

Calculated Columns are not triggered to refresh when measures are changed

 

This is a major issue for Tables created through DAX. Tables created through  powerquery have the problem, but a refresh will update it

 

To replicate the issue

  1. Create a New Table, "dimTable =  CALENDAR(1,10)"
  2. Add a measure, "SomeNumber = 5"
  3. Add a calculated Column , "AColumn = [SomeNumber]"
  4. Change the value of "SomeNumber" to 10, the calulated column is still displaying 5, (closing/opening does not update, refreshing data does not work either)

If the Table is created with powerquery, a data refresh seems to work, but still wont trigger DAX tables

The only way i can find is to change each calculated column formula

 

Using PowerBI version Feb 2017 

8 Comments

  • v-haibl-msft's avatar
    v-haibl-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Anonymous

     

    Please download the latest Mar 2017 version of Power BI Desktop and try it again.

    Best Regards,
    Herbert

  • Anonymous's avatar
    Anonymous
    Not applicable

     The March 2017 version Does Fix this. 

    Thank you

  • fullerpaul's avatar
    fullerpaul
    Regular Visitor

    Is it just me or is this issue occurring again in the August 2017 release? I've created a Calculated column that references some Measures. When I use the Calculated column on a matrix, the values are not adjusting when I change related slicers.

  • Anonymous's avatar
    Anonymous
    Not applicable

    fullerpaul, v-haibl-msft

     

    the issue is back again on my end as well. I am using the latest version (September 2017 release).

    What I have done is:

    1. I have two tables: a Data table and a Calendar table (simply all dates of 2017)

    2. In the calendar table, add a measure containing a dynamic value, based on the date a user selects: Selected Date = FIRSTDATE(Date)
    3. in the Data table, create a calculated column: Date = Selected Date

    4. If you change the Date in a slicer, the Measure "Selected Date" changes, but the calculated column doesnt.

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi CAG

     

    So that is not the same issue. This is how DAX/calculated columns have alway worked (to my knowledge)

     

    Calculated Columns are calulated independant of the report you are on... I use this deliberately to make sure calcs that only need to be done once are calculated once.. and not everytime a slicer is changed

     

    Given the calculated column is calculated with no context of the reports (i.e. slicers) then the measure FIRSTDATE(Date) will always be the same answer.. The issue I was reporting was that if you then changed the "Selected Date" measure to say LastDate(Date) (or a hard coded value), the calculated column would not be triggered to recalculate 

     

    There are probably other ways to achieve what you are trying to do.. with more info? 

    But using ADDCOLUMNS in a MEASURE can be useful way around this.  As it will be calculated when the measure is calculated. FILTER will often work too (depends on what you are trying to acheive)

     

    (BTW - I am not a microsoft employee... just trying to help out where I can)

     

    Hope this is useful information

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous,

     

    many thanks for your reply, this is very useful information!

    So calculated columns would only recalculate if I change the actual formula in the measure, if I understood correctly?

     

    I have posted a description of the problem I am hitting a couple of weeks ago, you can find it here:

    http://community.powerbi.com/t5/Desktop/Set-column-values-based-on-selection-from-different-table/m-p/220225#M97751

    If you could have a look at it to see whether you got any idea how to solve it, that would be awesome.

     

    Many thanks ahead!