Forum Discussion
Display bar chart/line chart result as per date range selection (month wise, week wise, day wise).
Hello All,
I am a beginner in PowerBI, I require help for one of the requirements :
Display bar chart/line chart result as per date range selection (month wise, week wise, day wise).
If date range selection > 1 month, show chart in months.
If it's < 1 month, show chart in weeks.
If it's < 1 week, show chart in days.
How can this be achieved in PowerBI desktop (November update)? Or a work around for the same will also do.
Thanks in advance !
Hi PrernaPedamkar,
Date hierarchy doesn't contain week automatically. You need to create a calculated column to calculate the weeknum values. You can download the attached .pbix in my original post to have a look.
Best Regards,
Qiuyun YuOk Sure. I am definitely going to work upon this work around. Thanks !
9 Replies
- v-qiuyu-msft
Community Support
Hi PrernaPedamkar,
Based on my research, it's not supported to change chart X-axis field dynamically based on the selected range in a slicer.
In your scenario, you can drag a Month, Week, Date fields into Axis property, when you checked different date range in a slicer visual, you are able to see values in different hierarchies manually. For more information, see: Visual hierarchies and drill-down behavior.
Best Regards,
Qiuyun Yu- PrernaPedamkarFrequent Visitor
Hi v-qiuyu-msft,
Thanks for the reply. I'll surely work upon the suggestion. However, for displaying weekwise data I donot see week hierarchy for my date column (Column Updated- refer below screenshot). Do I have to create a separate date table or is there any other workaround?
Thank you again for the help. :)
- v-qiuyu-msft
Community Support
Hi PrernaPedamkar,
Date hierarchy doesn't contain week automatically. You need to create a calculated column to calculate the weeknum values. You can download the attached .pbix in my original post to have a look.
Best Regards,
Qiuyun Yu