Forum Discussion
Dynamic Date
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.
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?
- parry2k8 years agoSuper User
Seems like you are adding var1 as column whereas it need to be Measure since you are using sum aggregation.
- js22468 years agoFrequent Visitor
I'm not sure how to write this as a measure.
I get the error a single value for 'Date1' in table 'Sheet1 cannot be determined. This can happen when a measure formula refers to a column that contains many values whithout specifying an aggregation....
I wouldn't think aggregating the dates would work since the vars are defined independently from them