Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
Is there any way to create a cyclic group in the script instead of defining it in document properties?
Thanks in advance,
Aldo.
Aldo wrote:I successfully created some variables, but I can not create variables where I need to calculate Sums, etc
You can assign expressions to variables like:
SET FinalAmount = sum((UnitPrice-Discount) * Quantity);
and then use the expression in a chart as:
=$(FinalAmount)
Is that what you are after?
Aldo wrote: I also want to know if there is any statement (in qlikview script) to be used like "Switch" or "Select Case" instead of dealing with a lot of "Ifs".
QV Script provides a Switch Case statement. It's a control statement, so it cannot be used in a LOAD statement, which may be what you are looking for. There are alternatives to nested if(), such as mapping or the match() function. If you can post some specific examples of what you are dealing with, perhaps we can provide some suggestions.
-Rob
If expression or field iterated over the chart dimension(s) contain one single value, that value is returned, else NULL is returned. Only can return numeric values as well as text values.
[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Test_2D00_Creating-Group-Sample-20100408000.qvw]
Guys,
I try Anatoly's approach, but something is missing.
Please take a look at the attachment.
Actually, I need to make the Table showing the sales by Db or Company or Division.
Rob, I am using your suggestions.
Thanks in advance for any help.
Aldo.
Aldo, I fixed your example.
see in attachment.
[View:http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Components.UserFiles/00.00.02.89.41/Test_2D00_Creating-Group-Sample-20100408001.qvw]
GREAT!
Thanks a lot!
Could you help me fixing the SET statement (in script) for variable "vdbOrCompOrDiv" in order to make Table2 working?
Take a look in the attached file.
Thanks again.
Aldo.
Aldo, what do tou want to achieve in table2?
The same thing as the first table, but creating the variable in the script, instead of typing
=CHR(91) & $(vCurField) & chr(93)
in the dimensions of the table.
Thanks,
Aldo.
Fantastic!
Thanks again,
Aldo.