Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have loaded data in a table below and every month user need to create a visualization of past 3 months data. How can I create column heading as month ? Thank you.
Data:
Key Year Month Value
A 2022 8 1
A 2022 10 2
A 2022 12 3
A 2023 1 14
A 2022 5 1
A 2022 6 1
B 2023 1 6
B 2022 10 8
B 2022 11 19
Output Table when view in Feb, 2023:
Nov Dec Jan
A 3 14
B 19 6
Output Table when view in Jan ,2023:
Oct Nov Dec
A 2 3
B 8 19
The calcul are dynamic regarding the selections made by the user ? If yes, you can create a expression with a set analysis : FieldDate = {">= AddMonths($(=Max(Your date)),-3) <= $(=Max(Your date))"}
OfCourse you can achieve using pivot table by adding month filed in column and key filed in row values in Measure
to get latest three month data you can use
Sum({<Date= {"$(='>=' & Date(AddMonths(Max(Date), -3)) & '<' & Date(Max(Date)))"}>} Value)