Announcements
cancel
Showing results for
Did you mean:
Anonymous
Not applicable

## Dynamic Month as calculate dimension

Hello,

I was stuck with one problem, I don't know how to create dynamic calculate dimension. Like you see image, I want to create dimension based od selected date:

the expression for Month = Date={">\$(=Date(Max(Date-30)))<=\$(=Max(Date))"}

the expression for Month -1 = Date={">\$(=Date(Max(Date-60)))<=\$(=Date(Max(Date-30)))"}

the expression for Month -2 = Date={">\$(=Date(Max(Date-90)))<=\$(=Date(Max(Date-60)))"}

the expression for Month -3 = Date={">\$(=Date(Max(Date-120)))<=\$(=Date(Max(Date-90)))"}

the expression for Month -4 = Date={">\$(=Date(Max(Date-150)))<=\$(=Date(Max(Date-120)))"}

the expression for Month -5 = Date={">\$(=Date(Max(Date-180)))<=\$(=Date(Max(Date-150)))"}

Is it possible to create a dynamic month dimension?

1 Solution

Accepted Solutions
Specialist

Also, if the previous solution doesn't work for you try this method.

First Uncheck the Show Legend check box to turn off the 'X' axis labels on chart.

the newly added text would appear on TOP LEFT side of your chart

Now click anywhere on chart to activate it and then press CTRL + SHIFT and you will see a red line around different objects in text

Now, Keep pressing CTRL + SHIFT and now you can drag this text box anywhere you want. You can then add more labels and put them at right place using this method.

7 Replies
MVP

May be this

If(Date > (Max(TOTAL Date) - 30) and Date <= (Max(TOTAL Date)), Dual('Month', 1),

If(Date > (Max(TOTAL Date) - 60) and Date <= (Max(TOTAL Date) - 30), Dual('Month - 1', 2),

If(Date > (Max(TOTAL Date) - 90) and Date <= (Max(TOTAL Date) - 60), Dual('Month - 2', 3),

If(Date > (Max(TOTAL Date) - 120) and Date <= (Max(TOTAL Date) - 90), Dual('Month - 3', 4),

If(Date > (Max(TOTAL Date) - 150) and Date <= (Max(TOTAL Date) - 120), Dual('Month - 4', 5),

If(Date > (Max(TOTAL Date) - 180) and Date <= (Max(TOTAL Date) - 150), Dual('Month - 5', 6)))))))

Anonymous
Not applicable
Author

Yes, I have now "special dimension" but bars on the graph are not aligned to the middle. On the graph you see 7 expressions, how to move bars on middle of dimension?

Regards

Jacek.

Specialist

Try changing the orientation of 'X' axis label this way.

Anonymous
Not applicable
Author

Hello,

Still from a visual point of view it looks bad. Label is not under bar and the line is not from beginning to end of the chart.

Regards

Jacek.

Specialist

Also, if the previous solution doesn't work for you try this method.

First Uncheck the Show Legend check box to turn off the 'X' axis labels on chart.

the newly added text would appear on TOP LEFT side of your chart

Now click anywhere on chart to activate it and then press CTRL + SHIFT and you will see a red line around different objects in text

Now, Keep pressing CTRL + SHIFT and now you can drag this text box anywhere you want. You can then add more labels and put them at right place using this method.

Not applicable
Author

Check if changing the style from grouped to stacked helps.

Cheers,

rohan

Anonymous
Not applicable
Author

Super trick. Thank you for your help. Big plus for you and Sunny.

Final effect:

Regards

Jacek.

Community Browser