Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rogeriobarbosa
Contributor II
Contributor II

Repeating the size on the same line where the values are equal?

Hello, please help me, I need to create a table that every Product it returns me the dimension and the Sales values Amount in the same linnha but when Similar is different skip to the next line, as attached example.


3 Replies
sunny_talwar

Like this?

Capture.PNG

Script:

LOAD *,

  'Product ' & AutoNumber(PRODUCT, SIMILAR) as ProductGroup;

LOAD * INLINE [

    PRODUCT,SIMILAR, SALES, AMOUNT

    AAAAAA,1, 10, 40

    BBBBBB,1, 20, 50

    CCCCCC,2, 30, 60

    DDDDDD,2, 30, 60

];

Dimensions:

SIMILAR

=Dual(Aggr(Repeat(' ', RowNo()), ProductGroup), ProductGroup)

Expressions:

PRODUCT

Sum(SALES)

Sum(AMOUNT)

rogeriobarbosa
Contributor II
Contributor II
Author

Hello, you're great, exactly what I needed

sunny_talwar

Awesome, please close the thread by marking correct answer if you got what you were looking for.

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny