Forum Discussion

BieBel's avatar
BieBel
Icon for Helper I rankHelper I
2 years ago
Solved

Fill out empty rows with data from other colums

I have a set of data registrations for several months => (value_reported) for every (yyyymm). Yet, for some months there has'nt been any registration. I would like to/need to fill out all the 'gaps' ...
  • Sergii24's avatar
    2 years ago

    Hi BieBel, you need to create a measure with the following logic:

    Measure Value Adjusted =
    VAR _Value = [Measure Value]                          //value of a measure you're interested in   
    VAR _yyyymm = SELECTEDVALUE( CalendarTable[yyyymm] )  //currently selected yymmmm
    VAR _yyyymm_Previous =                                //find prevoius _yyyymm
       MAXX(
         CALCULATETABLE(
           SELECTEDVALUE( CalendarTable[yyyymm] ),
           CalendarTable[mmyyyy] < _yyyymm
         ),
         [yyyymm]
       )
    
    RETURN
       IF(
         _Value <> BLANK(),
         _Value,
         CALCULATE(
           [Measure Value],
           CalendarTable[mmyyyy] = _yyyymm_Previous
         )
       )


    I hope it helps! Good luck with your project 🙂