Forum Discussion
Comparing multiple dates in date table
Hi Greenwoodr,
Can you share a dummy sample, please? Please mask the sensitive parts first.
I can't see the actual dates that were brought to another table in the formula.
Where is the context from in the visual?
Best Regards,
- Greenwoodr7 years agoHelper I
Here is a sample of the data in the subscription table - each Dateid links to the date dimension dateid with the signup date being the active relationship
I think my question is more of an idealistic one. I was under the impression that the best designs kept the date values in the date dimensions, linked by the a key rather that actual dates, and ideally one but splitting out into additional date tables (i.e have 1 date table fot the signup date relationship, 1 for paiddate and 1 for end date) is an acceptable choice.
However to use the equation I have I could only get it to work if I put the actual date in the main table which kind of defeats the object.
How can I change the relationships so I can access the date values in the date table more than once in the equation
so this code
'subscriptions'[Paiddate] <=max('Date'[Current_month_end_Date]) && ('subscriptions'[ENDDATE] > max('Date'[Current_month_end_date]becomes (something like:
'date'[date]<=max('Date'[Current_month_end_Date]) -- Using Paiddate relationship && ('date'[date]> max('Date'[Current_month_end_Date]) -- using enddate relationshipor could you use a lookup of somekind to use the PaidDateID to return the date value into this measure
Lookup('subscription'[Paiddateid],'Date'[Dateid],[date] <=max('Date'[Current_month_end_Date])Is this possible - As my equation works I am really looking for the most effiecient way of using the date table and avoid replication of information in tables {having the ID and the actual date in the main tables is a bit pointless)
Cheers - hope this makes sense!!
- v-jiascu-msft7 years agoMicrosoft Employee
Hi Greenwoodr ,
Why would you like to use more than one date? In other words, what's the result of your sample data?
Best Regards,