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.
Hello,
I have a question about the zoom slider in Power BI. In the visual below I use dates on the X-axis with a zoomslider. When all the data point are in the same month, the year is not visible in the labels on the X-axis. Is there a way to fix this? Thanks in advance!
Solved! Go to Solution.
Hi @eviswink
Enabling the slider label will show the period you've selected within the slider. However, if your slicer selections result in a single month, it will impact the slider range, causing the year to become invisible.
Alternatively, you can create a measure that returns the year if there's only one month in the current context.
Year =
IF (
-- Check if the selected value in 'dates[month and year]' is not blank
NOT ( ISBLANK ( SELECTEDVALUE ( dates[month and year] ) ) ),
-- If not blank, return the maximum year from the 'dates[year]' column
MAX ( dates[year] ),
-- If blank, return an empty string
""
)
Alternatively, you can create a measure that returns the year if there's only one month in the current context.
Hi @eviswink
Could you please confirm if your query have been resolved the solution provided by @Daniel29195 & @danextian ? If they have, kindly mark the helpful response and accept it as the solution. This will assist other community members in resolving similar issues more efficiently.
Thank you
Hi @eviswink
Enabling the slider label will show the period you've selected within the slider. However, if your slicer selections result in a single month, it will impact the slider range, causing the year to become invisible.
Alternatively, you can create a measure that returns the year if there's only one month in the current context.
Year =
IF (
-- Check if the selected value in 'dates[month and year]' is not blank
NOT ( ISBLANK ( SELECTEDVALUE ( dates[month and year] ) ) ),
-- If not blank, return the maximum year from the 'dates[year]' column
MAX ( dates[year] ),
-- If blank, return an empty string
""
)
Alternatively, you can create a measure that returns the year if there's only one month in the current context.
hello @eviswink
i understand what you want. try this workaround.
in the updated version of power bi , when enabling the zoom slider ,
if you expand the zoom slicer, you have slider labels toggled off. just toggle it on .
hope this helps
Hi @Daniel29195, thank you for your response. I toggled on the slider labels but this doesn't solve the issue unfortunately.
The column that I use on the X-axis is a date column.
User | Count |
---|---|
65 | |
61 | |
60 | |
53 | |
30 |
User | Count |
---|---|
180 | |
88 | |
71 | |
48 | |
46 |