Forum Discussion

rickferreiran's avatar
1 year ago

Line chart, display one day per week without changing the graph format.

Hello,
I have a line chart where the x-axis represents the days. However, I would like to display only one day per week on the x-axis without changing the overall format of the chart. My goal is to show the selected days in yellow, for exemple

 

 

I attempted to create a calculated column to display only the first day of each week in my line chart, with blank entries for the other days. However, this change affected the overall format of the chart, which I would like to maintain in order to see the evolution over the days:

 

Could you please advise on how to achieve the desired display of only one day per week without altering the format of the chart?

7 Replies

  • kpost's avatar
    kpost
    Icon for Solution Sage rankSolution Sage

    When you use "Categorical" mode, every value in the x axis is displayed.  When you use "Continuous" mode, Power BI selects which X Axis values to display if there isn't room to display them all.  At this time there is no way for the user to create a sort of customized X axis where every value in the chart is displayed but some custom list of X axis values are displayed, for example, "Display every x axis value where the weekday is thursday".

     

    I even went down a rabbit hole of experimenting with conditional formatting of the X axis value, but apparently there is no filter context in the axis so even if you make an additional calculated column with the weekday and specify that "if weekday = 4, color should be black, otherwise make it white", that doesn't work either.

     

    If you solve this I'd love to be wrong because there are a few reports I'd modify.

     

    ///Mediocre power bi advice, but it's free///

  • v-menakakota's avatar
    v-menakakota
    Icon for Community Support rankCommunity Support

    Hi  rickferreiran ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster. 

     

    Thank you

      • v-menakakota's avatar
        v-menakakota
        Icon for Community Support rankCommunity Support

        Hi rickferreiran ,
        Thanks for reaching out to the Microsoft fabric community forum. 

        Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

        Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
         
        Best Regards, 
        Menaka Kota 
        Community Support Team