Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Di_Ne_Sh
Contributor
Contributor

loop in Qlik Sense

Hi,

I'm trying to run loop for every single record based on start month and end month in table. The data should be added in new line for every month.

Source Table:

ID Start Month End Month Amount
1 202301 202303 10
2 202304 202306 20

 

I need to get something like

ID Start Month End Month Month Amount
1 202301 202303 202301 10
1 202301 202303 202302 10
1 202301 202303 202303 10
2 202304 202306 202304 20
2 202304 202306 202305 20
2 202304 202306 202306 20
Labels (1)
2 Replies
Or
MVP
MVP

Something along the lines of:

Load ID, StartMonth, EndMonth, StartMonth + IterNo() - 1 as Month, Amount

From YourTable

While StartMonth + IterNo() -1 <= EndMonth;

Di_Ne_Sh
Contributor
Contributor
Author

Thanks for the answer. Have achieved this with Intervalmatch function