Forum Discussion
Dynamic calculated column does not refresh
toha wrote:hey,
thanks for your replies.
Maybe i can descripe my problem different, because i think that i might be a problem with the row level security and my data model and my thinking.
I have simplified my 6 tables
- User
- User ID <-- this is where i filter the permissions for my roles
- Config
- User ID
- Report Start Date <-- from this cell i calculated different dates as measures (first of month, last of month, start of 4 weeks period, end of 4 weeks period and so on) <-- this report state date can be different for different users
- Date
- Date ID
- Some Date Columns
- Report Data 1
- User ID
- Date ID
- Formatted Timestamp column
- Value X
- Report Data 2
- User ID
- Date ID
- Formatted Timestamp column
- Value Y
- Report Data 3
- User ID
- Date ID
- Formatted Timestamp column
- Value Z
What I want to do is - i want to show my report data in two periods: "last month" and "last 4 weeks". Therefore my thoughts were to add 2 calculated column to the Dates table with "is in 4 weeks period?" and "is in last month period?" so i can add this columns as filters to different visualisations.
What I did in the meantime: i added a similar calculated column to one of the report data tables and there it works... but if i do this as a workaround i have to add the calculated column to all of my report data tables.
Instead of calculated column, maybe you can apply the DAX formula as filter.
4weeksPeriodValue =
CALCULATE (
SUM ( 'requiredTable'[requiredValue] ),
FILTER (
filteredTable,
MAX ( 'date_table'[date] ) >= config_table[measure_4weekPeriodStart]
&& MAX ( 'date_table'[date] ) <= config_table[measure_4weekPeriodEnd]
)
)Eric,
I am using that expression format for a measure. However, I'd like to be able to use that measure within a calculated column. But it sounds like changing the slicer on the measure calculation will not dynamically affect the calculated column's values.
What could be another way of getting this to work?
I am trying to select a baseline 12-month period to calculate a measure. In this case it is for base line energy consumption. I want to be able to run some calculations on other days/months/years to normalize the data for comparison purposes.
Thanks,
Chris Sembroski