Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a client that would like display the count of Customers that purchased a hearing aid in the currently selected year and when their last purchase as using a "Years From" dimension:
If customer, A, purchased a hearing aid in 2008 and customer, B, purchased in 2010 with the year 2013 is selected from the QV app master calendar, the "Years From" dimension would have "5 years" and "3 years" because 2013-2008 = 5 and 2013-2010 = 3. The expression in the straight table is Number of Customers = Count(DISTINCT CustomerID) per dimension.
But if the user selects 2014, those dimension values change to "+5 years" and "4 years".
I have not yet been able to find out how to have the "Years From" dimension dynamically change based on the Year selected. Attached is a sample app.
How about the Years From (New) chart in the attached .qvw file?
Unfortunately that QVW doesn't work for this issue. The CustomerID values cannot be in the straight table. This is a table summing up the # of Customers per "Years From" value. "Years From" should be the dimension but I can't get that expression to become a dimension.
In your example, it still only takes the first "Years From" value and doesn't display all values.
Mark
Would a Calculated Dimension like this help ?
= if ( (GetFieldSelections(Year) - PurchaseYear) > 0 ,
If( (GetFieldSelections(Year) - PurchaseYear) >5 ,
'+5 years', (GetFieldSelections(Year) - PurchaseYear) )
, null() )
See attached sample.
I used a Pivot Table object so I could see the underlying data, you can change it to whatever object type you wish. Also on the Year List Box I have set it to Always One Selected Value.
Best Regards, Bill
Hi Mark,
Please check out the attached. I think it gives you what you're looking for.