Forum Discussion
Multiple dates within same record on visual
- 3 years ago
Hi,
In the Query Editor, change the data type to Date. Create a Calendar Table and then create an active relationship (Many to One and Single) from the TSStart date column of the Data Table to the Date column of the Calendar Table. Create another relationship [Inactive] (Many to One and Single) from the TSEnd date column of the Data Table to the Date column of the Calendar Table. Create calculated column formulas for extracting Year, Month name and Month number. Sort the Month name column by the Month number. To your visual, drag Year and Month name column from the Calendar Table. Write these measures:
ID_start = distinctcount(Data[TSStart])
ID_end = calculate([ID_start],userelationship(Data[TSEnd],Calendar[Date]))
Hope this helps.
Hi,
In the Query Editor, change the data type to Date. Create a Calendar Table and then create an active relationship (Many to One and Single) from the TSStart date column of the Data Table to the Date column of the Calendar Table. Create another relationship [Inactive] (Many to One and Single) from the TSEnd date column of the Data Table to the Date column of the Calendar Table. Create calculated column formulas for extracting Year, Month name and Month number. Sort the Month name column by the Month number. To your visual, drag Year and Month name column from the Calendar Table. Write these measures:
ID_start = distinctcount(Data[TSStart])
ID_end = calculate([ID_start],userelationship(Data[TSEnd],Calendar[Date]))
Hope this helps.