I am trying to create a Bar Chart with Dimension like this:
If(Date >= $(vMaxDateforDimen), Month).
Means the dimension will display only Months that are greater than Max date based on selection
vMaxDateforDimen = monthend(AddMonths(Max(dimSurveyReceivedDateItself),-$(vNumRollinMonth)))
vNumRollinMonth is a number that user can change to see more or less Months of data.
I cannot add it into expression as I have Alternative dimensions as Quarters and Years that should be affected by this formula.
Thanks for replay.
It works and displaying the value but unfortunately it does not limit number of Month and shows all the months.
Any Idea why?
Please see below.
in a top chart I use the number of Months to display in expression so when I use 5 month chart displays 5 months.
But I cannot use it in expression because I need to add Years as dimension as well and years should show full year value and not only last 5 months based on selection.
In the bottom chart I use the formula you provided in dimension but it showas entire data for months without limiting it to 5 as it was chosen at the top.
I need the bottom chart show only five months as well.
Does it make sense?
Unfortunately I cannot share the app with real data and to create one with fake it will take too long.
Please let me know what kind of additional info you need from me and I will provide.