Forum Discussion
Jmccoy
5 years agoHelper II
Time Intelligence Help
I am refering to the article below to calculate a table to be used for time intelligence. Phil Seamark on DAX I have been able to recreate a few of the options I needed following the same patter...
- 5 years ago
Hi Jmccoy
Something like this?
//Last Month ADDCOLUMNS ( GENERATE ( SELECTCOLUMNS ( { "Last Month" }, "Period", [Value] ), GENERATESERIES ( EDATE ( DATE ( ThisYear, ThisMonth, 1 ), -1 ), DATE ( ThisYear, ThisMonth, 1 ) - 1 ) ), "Axis Date", [Value] )and similar for the others
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
AlB
5 years agoCommunity Champion
You should show what the exact expected result is. Try this
// Current week
ADDCOLUMNS (
GENERATE (
SELECTCOLUMNS ( { "Current week" }, "Period", [Value] ),
VAR weekStart_ = Today - (WEEKDAY(Today,2)-1)
RETURN GENERATESERIES ( weekStart_, weekStart_+6)
),
"Axis Date", [Value]
),
// Last week
ADDCOLUMNS (
GENERATE (
SELECTCOLUMNS ( { "Last week" }, "Period", [Value] ),
VAR weekStart_ = Today-7 - (WEEKDAY(Today-7,2)-1)
RETURN GENERATESERIES ( weekStart_, weekStart_+6)
),
"Axis Date", [Value]
)
Please mark the question solved when done and consider giving a thumbs up if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- Jmccoy5 years agoHelper II
Thank you so much, this is working exactly how I would like it to.