Forum Discussion

anvikuttu's avatar
anvikuttu
Advocate I
3 years ago
Solved

DAX question

Hi Team, I have trouble transforming Table A to the Output Calculated Table .  I wanted for every category and based on Min and Max dates, i want to generate consecutive dates between Min and Max fo...
  • TomMartens's avatar
    3 years ago

    Hey anvikuttu ,

     

    using GENERATE and GENERATESERIES does the trick:

     

    Table 2 = 
    SELECTCOLUMNS(
        GENERATE(
            'Table'
            , var startValue = [Min]
            var endValue = [Max]
            return
            GENERATESERIES( startValue , endValue , 1 )
        )
        , "A" , [A]
        , "Date" , [Value]
    )

     

    A screenshot:


    Hopefully, this provides what you are looking for.

    Nevertheless, you must consider that DAX tables will not benefit from all compressions that are happening during data load/data refresh. If the table becomes large, you might encounter performance degradation when this table is used inside measures.

    Regards,

    Tom