Forum Discussion

0205983's avatar
0205983
New Member
3 months ago
Solved

Line Chart Visual Axis Value Display

Hi, I would like to inquiry that how can I show my Axis value format like (6:30, 7:30 ....... 18:30) when slicer is choosing morning, when slicer choosing night then it will display (18:30, 19:30, 20...
  • v-sshirivolu's avatar
    3 months ago

    Hi  0205983 ,
    Thanks for reaching out to Community Forum.

    In Power BI this cannot be achieved using axis formatting alone because the visual does not support wrap around time like 18:30 to next day 06:30. To handle this, the solution is to control both the order of the axis and which time values are shown based on the slicer selection.

    Create a proper time table covering 06:30 through next day 05:30 along with an index column, and a separate slicer table with values like Morning and Night. Then use one measure to dynamically rank the time values so Morning stays in normal order and Night shifts early hours to appear after evening hours, and another measure to filter the visible range so Morning shows the first half of the day and Night shows the second half. Apply the filter at visual level and sort the axis by the ranking measure, which will give the expected behavior for both selections.

    Please Find the attached .pbix file for your reference.


    Thank you.