Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dynamic Date Axis:
I need a date axis in my visuals that dynamically adjusts based on the selected date range, with specific behavior as follows:
Solved! Go to Solution.
Hi,
I tried to create a test version like below.
It is quite difficult to step further in your semantic model because I do not have good understanding of the logic of the business requirement of the analysis.
I hope you can start from here to implement correctly.
Please check the below picture and the attached pbix file.
parameter selection measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 1, 2 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 0, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 3, 4 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 1, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 5, 6 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 2, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 7, 8 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 3, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 9, 10 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 4, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 11 }
&& COUNTROWS ( 'Date' ) >= 30
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 3, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 11 }
&& COUNTROWS ( 'Date' ) < 30
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 2, 1
)
Hi,
I tried to create a test version like below.
It is quite difficult to step further in your semantic model because I do not have good understanding of the logic of the business requirement of the analysis.
I hope you can start from here to implement correctly.
Please check the below picture and the attached pbix file.
parameter selection measure: =
SWITCH (
TRUE (),
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 1, 2 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 0, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 3, 4 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 1, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 5, 6 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 2, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 7, 8 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 3, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 9, 10 }
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 4, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 11 }
&& COUNTROWS ( 'Date' ) >= 30
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 3, 1,
SELECTEDVALUE ( DatePeriods[Sort] )
IN { 11 }
&& COUNTROWS ( 'Date' ) < 30
&& SELECTEDVALUE ( parameter_hour_day_week_month[sort] ) = 2, 1
)