Forum Discussion
kennyyip
8 years agoHelper I
Maintain date hierachy with date table
Hi, I have a data set "revenue" with revenue and date (only month end date involved but it's still down to day level). To use datesadd and tablesytd function I created a date table "Calendar" with ...
- 8 years ago
I solved my problem with reference to following links
https://www.sqlbi.com/articles/time-intelligence-in-power-bi-desktop/
https://sqldusty.com/2015/09/01/10-dax-calculations-for-your-tabular-or-power-pivot-model-part-1/
Ashish_Mathur
8 years agoSuper User
Hi,
The relatioship from revenue[date] to calendar[date] should be a many to one relationship. In the visual, drag Date from the Calendar Table.
kennyyip
8 years agoHelper I
Sorry, my bad to describe not accurately. You are right it's one to many from Calendar to Revenue. But I still couldn't get the date hierachy after relating both
- Ashish_Mathur8 years agoSuper User
Hi,
I always follow the best practise of creating Year and Month columns in the Calendar table and then dragging those to the visuals.