Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello all,
I have a sales overview chart which shows the adsales etc on the selected date range. I now have a requirement where the client wants to see data by day, by week abd by monthly as available in amazon accounts (screenshot attached).
I have created a filter measure (By day, By week and By month), however I am struck with how to proceed with the formula.
I am trying to use IF/Switch, for example,
Solved! Go to Solution.
You can use a field parameter to allow the user to choose the date granularity. There's a video explaining it at https://www.youtube.com/watch?v=KReYWx5NXYg and that also explains how to automatically adjust the date range for the chart dependent on which granularity is chosen
Hi , @Anusha_Banda
According to your description, you want to add a slicer to select the dimension showing on the x-axis.
This is my test data:
We can create a date table as a dimension table and create relationship between two tables.
Date = ADDCOLUMNS(
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"Year", YEAR ( [Date] ),
"Month", MONTH([Date]),
"Month_Name" , FORMAT([Date],"mmmm"),
"Week", weeknum([Date])& "week"
)
Then we can create a field parameter,like this:
Then we can control the dimension on the x-asxi:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you for the quick response. It worked 🙂
Hi , @Anusha_Banda
According to your description, you want to add a slicer to select the dimension showing on the x-axis.
This is my test data:
We can create a date table as a dimension table and create relationship between two tables.
Date = ADDCOLUMNS(
CALENDAR(FIRSTDATE('Table'[Date]),LASTDATE('Table'[Date])),
"Year", YEAR ( [Date] ),
"Month", MONTH([Date]),
"Month_Name" , FORMAT([Date],"mmmm"),
"Week", weeknum([Date])& "week"
)
Then we can create a field parameter,like this:
Then we can control the dimension on the x-asxi:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
You can use a field parameter to allow the user to choose the date granularity. There's a video explaining it at https://www.youtube.com/watch?v=KReYWx5NXYg and that also explains how to automatically adjust the date range for the chart dependent on which granularity is chosen
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
81 | |
72 |