Forum Discussion
Date Table/Date Slicer used with multiple dates from main data set
Hi,
I want to create a date table and create relationships between the date in the date table and the dates types in my main data set, however I'm having problems.
This is the only way I'm currently able to display the data. I had to edit the interaction of the visuals so the date only corrolates to the visual it's related to
I have created a date type and created the relationships between the two tables howover it isn't working for me
I'll add the PBIX file below
https://www.dropbox.com/s/ojxkg7fj5rjdf1i/Acquisitions%20-%20Community.pbix?dl=0
If anyone has any tips, it would be greatly appreciated
Thanks,
Mike
4 Replies
- amitchandak
Super User
I think first of merge what all you require in the Date table.
Now if the date table you do not have time and most of your date has time. Create new columns for all dates as the date by removing timestamps.
Easy one out is
Withdrwal_date = format(old_Withdrwal_date,"mm/dd/yyyy")
Make sure new columns are detected as the date. Join the, with the date table. Now refer the article how to use userelation to use different joins
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks.
My Recent Blog - https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601 - v-frfei-msft
Community Support
Hi michael_knight ,
We can use userelationship function to create measures for inactive relationship in your scenario.
- michael_knight
Post Prodigy
Thanks for the reply. Sorry I'm fairly new to the DAX world. I gave it a go and I've not had any luck. From what I saw from the example it was a start and end date in different tables, however the dates I will be using don't have a start and end date.
Withdrawals = SUM(Opportunity[Withdrawal Date])
Withdrawals_Count = CALCULATE( SUM(Opportunity[Withdrawal Date]), ALL(Opportunity[Withdrawal Date]), USERELATIONSHIP(Opportunity[Withdrawal Date], 'Full Date'[Full Date]) )https://www.dropbox.com/s/a3ma8onn6ipjqyb/Acquisitions%20-%20WBAH.pbix?dl=0
Thanks,
Mike
- michael_knight
Post Prodigy
Still stuck on this problem