The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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
)