Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Power BI Show All Dates Issue

I am trying to get all 52 weeks of the year shown in the Power BI graph for my data.

This data is showing money spent over a span, but in the data they input the date in which it was paid.

 

When I get the data and do categorical, it shows all the weeks I have but if I didn't spend money in week 32 as example, it won't show that number on the axis, I would like for all to show up if that makes sense.

 

Thanks you!

4 Replies

  • Anonymous , one way is add +0 to the measure

     

    Or try measure like 

    if(max([Date]) >=today() -52*7 , [Measure]+0 , blank()) 

    • Anonymous's avatar
      Anonymous
      Not applicable

      I got an error when I clicked add measure on this, is there certain steps to add this to it as I am still a little newer to PowerBI

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    It is needed to create another Dates table with all weeks you need and create relationships between your fact table and the new Dates table. Then, use week column from the new Dates table, instead of the week column from your fact table, to create visuals.

     

     

    Best regards

    Icey

     

    If this post helps, then consider Accepting it as the solution to help other members find it faster.

  • Icey's avatar
    Icey
    Community Support

    Hi Anonymous ,

     

    Please let us know if the replies above are helpful.

     

    If they are, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

     

    If not, please give us more details.

     

     

    Best Regards,

    Icey