Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI Guys,
HOw can I put below expression in Set Analysis?
=if([Category Name]='Beer',sum(Quantity)/24,sum(Quantity)/12)
thanks
Abhay
Sum({<[Category Name]='Beer'>}Quantity)/24,Sum({<[Category Name]='Beer'>}Quantity)/12
I don't think this can be converted into a set analysis expression. Best you can do is this:
=Sum(Quantity)/If([Category Name] = 'Beer', 24, 12)
Alternatively you can create a flag in a script:
Table
LOAD [Category Name],
Quantity,
OtherField
FROM Source
FlagTable:
LOAD Distinct [Category Name],
If([Category Name] = 'Beer', 24, 12) as Flag
Resident Table;
Expression:
Sum(Quantity)/Flag
Try the Below one
RangeSum(sum({<[Category Name]='Beer'>}Quantity)/24,sum({<[Category Name]-='Beer'>}Quantity)/12)
Hope this helps
Beautiful... This is very creative
Hie...
=sum({<[Category Name]={'Beer'}>}Quantity)/24+sum([Category Name]={'*'}-{'Beer'}Quantity)/12)
Hope this will helps you..!!
Regards,
Mohammad