Forum Discussion
Making date x-axis dynamic in tooltip
- Anonymous1 year ago
Hi, Anonymous
I am glad to help you.
Perhaps you can try to create dynamic x-axis field parameters to fulfill your needs.
First you need to create a DateTable, which should contain columns for Year, Quarter, Month, Week and Day:DateTable = ADDCOLUMNS ( CALENDAR (MIN('SalesTable'[Date]), MAX('SalesTable'[Date])), "Year", YEAR([Date]), "Quarter", "Q" & FORMAT([Date], "Q"), "Month", FORMAT([Date], "MMMM"), "Month Number", YEAR([Date]) * 100 + MONTH([Date]), "Week", WEEKNUM([Date]), "Day", DAY([Date]), "Day of Week", FORMAT([Date], "dddd") )
Then create a relationship between the DateTable and the original table:
Create a field parameter, select the Day, Week, Month field of the DateTable:
Then add a new Page2, add a Line chart visual, drag the corresponding fields to the visual, and set it as Tooltips:
Then apply the customized Tooltips to the visual in Page1:Result:
I have attached the pbix file for this small example below, hope it helps.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
I am glad to help you.
Perhaps you can try to create dynamic x-axis field parameters to fulfill your needs.
First you need to create a DateTable, which should contain columns for Year, Quarter, Month, Week and Day:
DateTable =
ADDCOLUMNS (
CALENDAR (MIN('SalesTable'[Date]), MAX('SalesTable'[Date])),
"Year", YEAR([Date]),
"Quarter", "Q" & FORMAT([Date], "Q"),
"Month", FORMAT([Date], "MMMM"),
"Month Number", YEAR([Date]) * 100 + MONTH([Date]),
"Week", WEEKNUM([Date]),
"Day", DAY([Date]),
"Day of Week", FORMAT([Date], "dddd")
)
Then create a relationship between the DateTable and the original table:
Create a field parameter, select the Day, Week, Month field of the DateTable:
Then add a new Page2, add a Line chart visual, drag the corresponding fields to the visual, and set it as Tooltips:
Then apply the customized Tooltips to the visual in Page1:
Result:
I have attached the pbix file for this small example below, hope it helps.
I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.