Forum Discussion
huqsami
3 years agoFrequent Visitor
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...
- 3 years ago
I think i have figured, bellow code worked for me:
// MATADDCOLUMNS(GENERATE(SELECTCOLUMNS({"MAT"},"Period",[Value]) ,GENERATESERIES(DATE(ThisYear-1 ,ThisMonth, 1) ,DATE(ThisYear,ThisMonth,ThisDay))),"Axis Date",DATE(YEAR([Value]),MONTH([Value]),DAY([Value]))),
huqsami
3 years agoFrequent Visitor
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])
)
),