Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Can anybody please tell me the set analysis statement for nested loop.
Yup
SUM(if(Brand='LEVIS',QTY)) now for this statement you can write set expression
sum({$<Brand={'LEVIS'} >} QTY)
This just for reference you can similarly go for the nested if
What do you mean by 'loop'?
Thankyou Sujeet for the quick response, It would be great if you have help me out a lil in detail.
I need the exact Set analysis statement for the below nested if:
If([Rolling Month] = 'Apr - 2005',1,
If([Rolling Month] = 'May - 2005',2,
If([Rolling Month] = 'Jun - 2005',3,
If([Rolling Month] = 'Jul - 2005',4,
If([Rolling Month] = 'Aug - 2005',5,
.
.
.
.
.
.
If([Rolling Month] = 'Mar - 2010',60,))))))
Add a column with 1, 2, 3 .... for each Rolling Month
and use it
Fabrice
Thankyou but this will not solve my problem. I would need to write 60 rolling month as per your answer.
I need the exact Set analysis statement for the below nested if:
If([Rolling Month] = 'Apr - 2005',1,
If([Rolling Month] = 'May - 2005',2,
If([Rolling Month] = 'Jun - 2005',3,
If([Rolling Month] = 'Jul - 2005',4,
If([Rolling Month] = 'Aug - 2005',5,
.
.
.
.
.
.
If([Rolling Month] = 'Mar - 2010',60,))))))
With this column (or any expression that returns 1 to 60 for the rolling months), you avoid all these nested if()
What do you want to do ?
1) to do a nested complicated thing whatever the result ?
2) return a Number for a given Rolling Month ? and insert it into another expression ? use it as a dimension ?
Fabrice
I want to use it as a dimension. creating a column is a hectic task but would definitely solve the purpose. I am looking for something that would reduce the length of script.
in the script, use functions like
rowno(), autonumber(), autonumberhash128 or 256()
in the UI (Calculated Dimension), you can use also a function like FieldIndex('Field', Field) to get sth numbered from 1 to the number of values (according to the FIRST load order).
Fabrice