Forum Discussion

maclura's avatar
maclura
Resolver I
4 years ago
Solved

Create missing records for missing dates

Hi,

I know there are many questions like this, but I don't have enough DAX to customize them to solve my problem.

 

In short,

I have this daily summary table

and I need to transform it like this

 

Until now I am just able to create a table which is the cartesian product of [ID] and my calendar [Date] with CROSSJOIN.
But I don't know how to associate the existing Val 1,2 and 3 to the proper record and populate the missing values with zeroes.

Thanks for any help.

maclura

  • Once you have the cross join, one option to populate the columns is with a LOOKUPVALUE.

     

    For example:

    Val1 =
    LOOKUPVALUE (
        Summary[Val1],
        Summary[ID], Transform[ID],
        Summary[Date], Transform[Date],
        0
    )

4 Replies