Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Removing dates with no data from visual

Hi community

 

I'm losing my mind over a simple problem, that I have only found very complex variations of, so I can't find a solution anywhere.

 

I'm looking at this cummulative bar chart below, and I want to remove the spaces. The dates don't exist in the data set, because there have been no postings. So its only BI creating an axis with all dates in them.

 

The bar chart is a measure consisting of the following formula:

 

Balance YTD =
Calculate(
sum('Table1 (2)'[Amount]);
                 DATESYTD('Table1 (2)'[Posting Date]))
 
I've tried different variations of IF ISBLANK and PREVIOUSDAY to somehow get the measure to fill out the empty dates, with the last occuring value, but to no avail.
 
I'm happy with whatever solution, so long as the spaces go away. Do you have any idea how to solve the issu?

3 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Change your x-axis from Continuous to Categorical.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Gah I knew it would be some silly trick. Thank you so much!

      • Greg_Deckler's avatar
        Greg_Deckler
        Community Champion
        It's OK! There are so many switches and settings now it is tough to keep track of them all!