Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Qlik Analytics Tour 2020 Online. Begins August 10th. Register Today
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Problem copying pasting formula

I have a problem in Qliksense with copying and pasting a formula. At first it was an old formula for a different data set and it was working just fine. I changed the header of the dataset and therefore had to change my formula. During the adaptation of the formula all of a sudden I couldn't type or past the text I wantend. So I went on to edit the formula in a notepad to paste the entire thing but also then cuts of the paste at some point.

I tested the individual parts of my formula and they seem to be working just fine.

I have no idea where to look for the mistake since the individual parts of the formula works and a copy of the formula with different headers works perfectly fine with the other dataset.

Would anyone know where to look for the solution?

I added the textfile of the formula.

Tags (1)
4 Replies
Highlighted
MVP
MVP

Re: Problem copying pasting formula

Well, following isn't handling your problem with editing an expression, this might be due to the length of the expression or number of spaces used or something else, I don't know.

But have you considered simplifying your expression? It seems that you are essentially aggregating some five to six fields, with different filter used in set expression, then summing the resulting values returned from the aggregations.

Maybe you can combine the aggregations of one field by combining the filters in your set analysis

(not sure if this is feasable, might depend on your data and model), like

Sum({<Field = {A}>} Value) +Sum({<Field = {B}>} Value)

turned into

Sum({<Field = {A, B}>} Value)

Highlighted
Creator II
Creator II

Re: Problem copying pasting formula

I ran into a similar issue a while back where my lengthy expression worked inconsistently. Even though this expression with the prior header worked for you, as suggested by swuehl please consider simplifying it a little (eg: see if the +  and - of the sums can be made compact using single set expressions. Also look if there is a need to use a single quote for '0' and '1' when we can use 0 and 1. )

The blank spaces my be good for viewing but use some editor tool to trim them off. In my experience they have caused me issues when copying pasting (as they add to the total length of characters and sometimes results in the expression being truncated)

What was the field name that was changed? In you expression you have lot of fields and they are in camelcase(mix of upper and lower case). It will help to go through them thoroughly to make sure nothing is misspelled.

Highlighted
Not applicable

Re: Problem copying pasting formula

Thank you both. I simplified the formula conform swuehl's instructions and now it does work. I will try whether I can remove the single quote from my formula as well.

Thanks!

Highlighted
Creator II
Creator II

Re: Problem copying pasting formula

Great! Good to know that your formula now works. If you are happy with the responses and your problem is solved, please mark this thread complete by selecting the correct answer. (whenever you get a chance).