Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

ADD missing lines

Happy new year everyone.

I Have a table with different column and a column with the date on wich the data of the row have been filled.

So if a day there is no data, there is no row, so no date, and if I show a trend per day, the missing date will be skipped.

How can I add the missing dates with custom values on other columnns ?

  • Hi , Anonymous 

    According to your description, you want to add the missing date . 

    Here are the steps you can refer to :
    (1)This is my test data:

    (2)We can create a 'Date' Table as a dimension:

    Date = CALENDAR(FIRSTDATE('Table'[Date]), LASTDATE('Table'[Date]))

    (3)Then we need to create a relationship between two tables:

    (4)Then we can put the 'Date'[Date] on the row header and we can meet your need:

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • Anonymous , Create a date table and join that with date of your table. Use date table's column in visual and slicer.

     

    then create a measure with

    Sum(Table[Value]) +0

     

    plus 0 will show dates non available with 0

     

    or like

    0 between range
    Measure = var _1= SUM(Opportunity[Opportunity count]) +0
    var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
    var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
    return
    CALCULATE(if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1))

  • Hi , Anonymous 

    According to your description, you want to add the missing date . 

    Here are the steps you can refer to :
    (1)This is my test data:

    (2)We can create a 'Date' Table as a dimension:

    Date = CALENDAR(FIRSTDATE('Table'[Date]), LASTDATE('Table'[Date]))

    (3)Then we need to create a relationship between two tables:

    (4)Then we can put the 'Date'[Date] on the row header and we can meet your need:

    Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

     

    Best Regards,

    Aniya Zhang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly