Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel77
Creator
Creator

Is there a limit to lines in a Measure

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

Daniel77_0-1669735831265.png

 

 

 

 

 

 

 

and when i add the 7th version of the measure 

Daniel77_1-1669735982250.png

ALL values turn to null.

 

Daniel77_2-1669736020490.png

 

 

When i remove the 1st group and leave the 7th i get the values back (but not for the 1st).

Daniel77_3-1669736115091.png

 

This makes me think there is a limit. Is this correct?

thank you in advance

 

Daniel

Labels (3)
8 Replies
David_Friend
Support
Support

@Daniel77 what version of QlikSense?

Daniel77
Creator
Creator
Author

Hay, thanks for the reply,

it's,

Feb22 patch 3

 

Daniel

Daniel77
Creator
Creator
Author

Hi David,

Is this the information you were looking for? Feb22 patch 3

 

Do you have any advice on this subject? thank you

 

Daniel

David_Friend
Support
Support

I haven't been able to find any documentation on this, @Sebastian_Linser or @Michael_Tarallo any suggestions from you guys?

Or
MVP
MVP

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

Daniel77
Creator
Creator
Author

Hi,

Thank you for your suggestions, i will give this a go!, thank you

Daniel

Daniel77
Creator
Creator
Author

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)

Daniel77_3-1669886815662.png

Do you have any suggestion please?

Thanks again

Daniel

marcus_sommer

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