Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have to relate the correct enf* tot he part so i can make the sum required.
I have the following Measure which is repeated 6 times and works fine, but when i add a 7th repeat i get null value
I wonder if there is a line limit in QS Measures?
:
If(enf01 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf02 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf03 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf04 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf05 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf06 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf07 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf08 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf09 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf10 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf11 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf12 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf13 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf14 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(enf15 = Fibre and Part = enc01,
sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
the Measure is the fibre weight field below:
this is with 6 of the above measure
and when i add the 7th version of the measure
ALL values turn to null.
When i remove the 1st group and leave the 7th i get the values back (but not for the 1st).
This makes me think there is a limit. Is this correct?
thank you in advance
Daniel
@Daniel77 what version of QlikSense?
Hay, thanks for the reply,
it's,
Feb22 patch 3
Daniel
Hi David,
Is this the information you were looking for? Feb22 patch 3
Do you have any advice on this subject? thank you
Daniel
I haven't been able to find any documentation on this, @Sebastian_Linser or @Michael_Tarallo any suggestions from you guys?
I realize this isn't the original question, but perhaps you could refactor the code to avoid the issue in the first place?
If(Part = 'enc01' AND Match('Fibre',enf01,enf02,enf03),sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY) // Extend the Match for as many enfXX as needed
Hi,
Thank you for your suggestions, i will give this a go!, thank you
Daniel
Hi again,
Thanks for the suggestion, i would really like to simplify the expression.
I tried as you mentioned however the return was all null:
Aggr(
If(Part = 'enc01' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight01) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc02' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight02) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc03' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight03) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc04' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight04) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc05' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight05) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc06' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight06) *Sum(Distinct Percentage) / 100 * OrdQTY,
If(Part = 'enc07' AND Match('Fibre',enf01,enf02,enf03,enf05,enf06,enf07,enf08,enf09,enf10,enf11,enf12,enf13,enf14, enf15 ),sum(distinct enscweight07) *Sum(Distinct Percentage) / 100 * OrdQTY,
)))))))
,[Portal Order No.],Part,Fibre,Percentage)
Do you have any suggestion please?
Thanks again
Daniel
I don't know if there are any limitations within Sense implemented in regard to the editor-window, the following parser and/or the engines. I assume there are ones like the max. of 99 if-loops within an expression within the (older ?) QlikView releases.
But IMO none of them are important because before you really hit one you will have massive issues with your data-model and/or UI design. All essential logic belonged into the data-model and the UI expressions are ideally just simple sum(Field) or count(Field) and the user just selects the wanted dimensionality.
Therefore, I suggest to re-design the data-model by resolving the multiple crosstable-structures within your data. Here is an excellent explanation on how it might be done:
The Crosstable Load - Qlik Community - 1468083
- Marcus