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

I want to use an expression as a dimension for a line chart

Hi Guys,

I want to use an expression as a dimension for a line chart, I got variables set as Current month to Previous 12 months, how do I use all of them so I wouldn't have to change them every month, that they will be dramatic.

Cheers

23 Replies
Gysbert_Wassenaar

No, dual valued as the dual function creates values: Dual( 'A', 1). The same way Time(), Date() and Month() create dual values that have both a numeric value and a textual display format.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

This expression works with the '201601' fields

LET vMonthPrevious1 = Date(Monthstart(AddMonths(Today(),-1)), 'YYYYMM');

How do I embed that one into

Sum({<MyDateField={'>=$(=MonthStart(Today(),-12))<=$)=MonthStart(Today(),-1)))'>}>}Amount)

this and will it work?

Anonymous
Not applicable
Author

This works in a text box measure, but not in a line chart

sum({<[SALES MONTH]={'$(vMonthPrevious4)'}>}[Value PQ])

Anonymous
Not applicable
Author

Will the attached qvf work?

- Use script to convert SALES DATE to a date dimension

- Use set analysis to only SALES amounts in the last 3 months; otherwise, SALES will be 0

- Limit SALES DATE only to show SALES is greater than 0