Forum Discussion
Dynamic Date
you need a date dimension table in your model, from that table use date as a slicer and in your formula replace "31-Jan-2017" with MAX(DateTable[Date])
- js22468 years agoFrequent Visitor
Thank you for your response but could you provide more details please. I'm newer to this.
At what point do I do this?
If I create a date table based on entered data then try to create new columns for my calculated variables based on that datetable[date] then I would have to establish some sort of relationship between the date table and my original table correct? And I can't establish a relationship between the datatable[date} and all of my dates, correct?
I tried no relationship and created new column var1 = if (sheet1[Date1]<max(datetable[date]),1,0)
and for daterange[date] i filtered to one date value but my var1 result is not effected.
- parry2k8 years agoSuper User
no you don't need to establish relation, it will work without relation, you just want to get date from the slicer.
https://www.mssqltips.com/sqlservertip/4857/creating-a-date-dimension-table-in-power-bi/
http://radacad.com/create-a-date-dimension-in-power-bi-in-4-steps-step-1-calendar-columns
- js22468 years agoFrequent Visitor
I don't know what I'm doing wrong then because I can't get the slicer to change anything. Var1 is set to the sum, and clicking on different dates doesn't effect it at all. Do you see something I'm doing wrong?