Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

creating waterfall charts with labels that have expressions in them

I am trying to use bar offset to create a waterfall chart. I have read the posts about creating the bar offsets, they all talk about using the expression labels, my problem comes in where in my expression labels has an expression itself, so its very long and complicated. An example of one of my labels is:

='Total Revenue '& IF(Len(GetFieldSelections(MONTH_DATE))=0,Date(MonthStart(today(),-2),'MMM YYYY'),Date(monthstart(Date#(Max(MONTH_DATE) & '/1/' & Max(YEAR_DATE),'M/D/YYYY'),-1),'MMM YYYY'))

now I have tried the method of sum([='Total Revenue '& IF(Len(GetFieldSelections(MONTH_DATE))=0,Date(MonthStart(today(),-2),'MMM YYYY'),Date(monthstart(Date#(Max(MONTH_DATE) & '/1/' & Max(YEAR_DATE),'M/D/YYYY'),-1),'MMM YYYY'))]) - sum([another label]).

this does not break the chart, but it also does not offset the bars, how can I get this to work with such complex labels?

Mike

3 Replies
Anil_Babu_Samineni

This returns always 0 only because you are calculating static names with in the Aggregation. That won't help for you. Can you try this?

='Total Revenue '& IF(Len(GetFieldSelections(MONTH_DATE))=0,Date(MonthStart(today(),-2),'MMM YYYY'),Date(monthstart(Date#(Max(MONTH_DATE) & '/1/' & Max(YEAR_DATE),'M/D/YYYY'),-1),'MMM YYYY'))


If you try above one what you get in Label ?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
marcus_sommer

I think you will need dollar expansion for it: The Magic of Dollar Expansions‌.

- Marcus

Not applicable
Author

Sorry, maybe I didn't explain it well, the label works fine, shows up in the legend and says exactly what it needs to say, its getting the bar offset to work right. all the examples I have found use the label names in the bar offset, but my label name information is so complicated it is not working properly. the code I gave above is what the entry was for one of the labels.