Missing bars in my bar chart

  • Missing bars in my bar chart

    Posted by DSC Communities on April 17, 2020 at 12:42 am
    • Matthew Paul

      Member

      April 17, 2020 at 12:42 AM

      Hello,

      It’s driving me crazy, but I have missing bars in my bar chart where I know there should be a bar.Ā Ā 

      I want to track the new registrations from my website every day, summing up the new registrations over the previous 7 days, so I created this measure:


      WeeklyRegistered = CALCULATE(
      Ā  DISTINCTCOUNT(users[userid]),
      Ā  DATESINPERIOD(users[register_timestamp_PST], LASTDATE(users[register_timestamp_PST]), -7, DAY)
      )

      Works great for the most part.Ā  However, in my data set, I have a few days where there were no new registrations on that day.Ā  When I go to chart this out with the date along the X axis, all of the days have the correct info except days where there were no registrations.Ā  Instead of still summing up the previous 6 days which did have registrations, I just get an empty space in my chart.Ā  Looks like this:


      Any help would be useful.Ā Ā 

      Thanks.

      ——————————
      Matthew Paul
      Snohomish, WA
      ——————————

    • Vincent Lacomme

      Member

      April 19, 2020 at 6:20 AM

      Hi Matthew,

      In your Power BI model, do you use a distinct date table (connected to your fact table) ?
      This is most likely the reason of these blank spaces.

      More on that there : https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/

      ——————————
      Vincent L.
      Chartered accountant – Expert-comptable
      ——————————
      ——————————————-

    DSC Communities replied 5 years, 11 months ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

The discussion ‘Missing bars in my bar chart’ is closed to new replies.

Start of Discussion
0 of 0 replies June 2018
Now

Welcome to our new site!

Here you will find a wealth of information created for peopleĀ  that are on a mission to redefine business models with cloud techinologies, AI, automation, low code / no code applications, data, security & more to compete in the Acceleration Economy!