Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
pascos88
Creator II
Creator II

Generate a loop in order to complate the table

Hello everyone,

I have the table show in the picture.

I have just once the BDG_PerDay.

I need to replicate the same value for each day of the month.

The number of the day is the field DayPerMonth.

What I have is the picture

what I want is

%KEY_BDG_YTD              BU_P50_PROD         DayPerMonth          BDG_PerDay                Day

Bazoches_2016_Jan             362865                              31                    117053.4135484             01

Bazoches_2016_Jan             362865                              31                    117053.4135484             02

Bazoches_2016_Jan             362865                              31                    117053.4135484             03

....

Bazoches_2016_Jan             362865                              31                    117053.4135484             31

Bazoches_2016_Feb            3170218                             28                    113222.07142857           01

Bazoches_2016_Feb            3170218                             28                    113222.07142857           02

...

Bazoches_2016_Feb            3170218                             28                    113222.07142857           28

Day should be a new Field

Thanks for any help

Pasquale

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Try this:

LOAD

    %KEY_BDG_YTD,           

      BU_P50_PROD,       

      DayPerMonth,

      BDG_PerDay,

      IterNo() as Day

FROM

    ....source...

While IterNo() <= DayPerMonth

    ;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Nicole-Smith

Check out this post by hic‌: How to populate a sparsely populated field

Gysbert_Wassenaar

Try this:

LOAD

    %KEY_BDG_YTD,           

      BU_P50_PROD,       

      DayPerMonth,

      BDG_PerDay,

      IterNo() as Day

FROM

    ....source...

While IterNo() <= DayPerMonth

    ;


talk is cheap, supply exceeds demand