Forum Discussion
Date Filter
- 6 years ago
AnonymousDid you create a relationship between your new calculated table and fact table?
A simpler and crude appoach would be to create a calculated column in your date dimension table called Period which will use a switch statement to spit out a period value. A crude vesion below:
Period = SWITCH(TRUE(), TODAY() - 'Date Table'[Date] <= 7, "Last 7 Days", TODAY() - 'Date Table'[Date] <=30, "Last 30 Days", "All period")
how do you create a calculated column in date table. Are you saying create this calculated column in the dimension table or the date table? Either way I dont know how to create the calculated column.
Anonymous You will create this calculated column on yout Date Dimension table (which I presume is called 'Date Time').
It is simple to create a calculated column - you right click on table name and select New Column from thee menu. It will open up an area on top where you enter a DAX expression.