Forum Discussion

vbourbeau's avatar
vbourbeau
Resolver II
5 years ago
Solved

Line chart type continuous gray out

 

Hi  look at the above graph. I use Year/WeekNum as X axis. It works ok but powerBi adds a scroll bar.

I want to see it on one page? I know that the feature "continuous" on the X axis must do the job but I can't select it.

Furthermore, If I only use Week num the result is ok I see it all on one page but the week isn't in the correct order since the end is week 52, it must the actual week in 2021 and the start in 2020.

 

 

 

  • Hi , vbourbeau ;

    If this is the case, you could  set the Minimum category width and enlarged visiual width in visualizations as well.as following picture shows:

    Because if it is a number type and it is not categorical, it will be arranged in numerical order, and the missing numbers will be filled in, so I think the above method is more appropriate.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

9 Replies

  • PaulDBrown's avatar
    PaulDBrown
    Community Champion

    Ae you using a date table?

    as regards your second issue, can you explain further (perhaps show a depiction of the expected outcome)?

    thanks!

    • vbourbeau's avatar
      vbourbeau
      Resolver II

      Yes I use a date table. The second graph isn't an issue I just show that is I only use week number as X axis we can see the graph without the scroll bar as I want. But the order must be something like that.
      23-24-25-26....52-1-2-3-4-5... 22. You understand. As we are the 23th weeks the graph must start with 2020 week 23 and end with 2021 week 22. It's the outcome I'm looking for.
      I want to make the first graph enter in a "no scolling bar graph".

       

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    hi, vbourbeau ;

    You could new a column  by the following formula:

    rank = RIGHT(YEAR([Date]),2)&"-"&IF(LEN(WEEKNUM([Date]))=1,"0"&WEEKNUM([Date]),""&WEEKNUM([Date]))

    then add it to x-axis; and sort by rank:

    The final output is shown below: 

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.  

     

    • vbourbeau's avatar
      vbourbeau
      Resolver II

      Still gets the scroll bar. 

      I notice that if the X axis is numeric the scroll bar disapear. But Power Bi short it by numeric order where is'nt what I'm looking for.

      • v-yalanwu-msft's avatar
        v-yalanwu-msft
        Community Support

        hi, vbourbeau ;

        If you want the x-axis to be numeric, you can change dax to:

        rank = CONVERT(YEAR([Date])&IF(LEN(WEEKNUM([Date]))=1,"0"&WEEKNUM([Date]),""&WEEKNUM([Date])),INTEGER)

        If it not solved, please provide me with more details about your problem or share me with your pbix file after removing sensitive data.

        Best Regards,
        Community Support Team_ Yalan Wu
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Community Support

    Hi , vbourbeau ;

    If this is the case, you could  set the Minimum category width and enlarged visiual width in visualizations as well.as following picture shows:

    Because if it is a number type and it is not categorical, it will be arranged in numerical order, and the missing numbers will be filled in, so I think the above method is more appropriate.

    Best Regards,
    Community Support Team_ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.