Forum Discussion

huqsami's avatar
huqsami
Frequent Visitor
3 years ago
Solved

Row Based Time Intelligence for MAT

Hi There, I got this awesome code from Phils Blog for Row Based Time Intelligence Slicer for Custom Period [Pased Bellow].   Now i need to come up with a code that will also include MAT [Moving An...
  • huqsami's avatar
    3 years ago

    I think i have figured, bellow code worked for me:

     

    // MAT
                    ADDCOLUMNS(
                        GENERATE(
                        SELECTCOLUMNS({"MAT"},"Period",[Value]) ,
                        GENERATESERIES(
                                DATE(ThisYear-1 ,ThisMonth, 1) ,
                                DATE(ThisYear,ThisMonth,ThisDay)
                                )
                            ),
                        "Axis Date",DATE(YEAR([Value]),MONTH([Value]),DAY([Value])
                        )
                    ),