Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HEy,
In my excel sheet , i have 3 columns : Year , Customer , Sales.
I want to show Customer name for last year.
I have used following set analysis but it is giving error. Kindly tell em what to do.
Customer = p({<Year={$(max(Year)}-1>})
Thanks
Create a Straight Table
Dimension
1) Year
2) =IF(Year = (Year(Today())-1),Customer)
Tick Suppress When Value is Null for 2nd Dimension
Expression
SUM(Sales)
Try like:
Customer = p({<Year={"$(=max(Year)-1)"}>})
Hey,
It is still giving me error.
Can you post sample qvw
Try to post your complete expression.
Hi Nikhil,
for getting customer for last year : only({<Year={'$(=max(Year))-1>}) Customer)
for getting sales for last year : Sum({<Year={'$(=max(Year))-1>}) Sales)
Hey,
In my question , i have already uploaded my expression.
Thanks
Missing quotes; improper parenthesis. Try:
only({<Year={'$(=max(Year)-1)'}>} Customer)
sum({<Year={'$(=max(Year)-1)'}>} Sales)
:Note: Only() would only work if there is single customer for the max year, otherwise, try with concat(),k like:
Concat({<Year={'$(=max(Year)-1)'}>} Customer, ',')
try this
ONLY( {$<Customer = p({<Year={"$(=max(Year)-1)"}>})>} Customer )