Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
An issue has been identified on Qlik Cloud hub, please visit our Status Update Page for details: GET THE LATEST
cancel
Showing results for 
Search instead for 
Did you mean: 
beck_bakytbek
Master
Master

Create a new row ( as value of dimension)

Hi Folks,

i got a question, my table does look like:

Produkt Month Value
a 1 2
a 2 4
b 1 20
b 2 25
b 3 30

 

as you see, i have dimenions: Month with 3 Month (1,2,3), but my product  A does not have the month 3, my expected output is:

Produkt Month Value
a 1 2
a 2 4
a 3 0
b 1 20
b 2 25
b 3 30

 

Does anybody have any idea how to generate a new / empty row?

 

Thanks a lot

Bek

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
Rockstar7
Partner - Creator
Partner - Creator

@beck_bakytbek 

try below one,

Tab:
Load 
AutoNumber(Produkt&Month) as _KEY,
Produkt,
Month,
Value
Inline [
Produkt, 	Month, 	Value
a, 	1, 	2
a, 	2, 	4
b, 	1, 	20
b, 	2, 	25
b, 	3, 	30
];

Tab2:
Load Distinct Produkt as Prod Resident Tab;
Join
Load Distinct "Month" as MOn Resident Tab;


NoConcatenate
Tab3:
load *,

AutoNumber(Prod&MOn) as _KEY

Resident Tab2;

Drop Table Tab2;

 Output:

Rockstar7_0-1662893130299.png

 

View solution in original post

6 Replies
Rockstar7
Partner - Creator
Partner - Creator

@beck_bakytbek  if you have a date field in your dataset then create a master calendar using that date field and derive and use derived month of master calendar in the table. 

if there is no date field still we can generate a missing data, please refer the below one you will get it.

Generating Missing Data 

beck_bakytbek
Master
Master
Author

@Rockstar7  thanks a lot for your time and help. i try to implement it in my case and will let you know, when i achieve the expected result. 

beck_bakytbek
Master
Master
Author

@Rockstar7 

"if you have a date field in your dataset then create a master calendar using that date field and derive and use derived month of master calendar in the table" - can you show me the example. i implemented this issue, but it does not work.

thanks a lot

Rockstar7
Partner - Creator
Partner - Creator

@beck_bakytbek 

try below one,

Tab:
Load 
AutoNumber(Produkt&Month) as _KEY,
Produkt,
Month,
Value
Inline [
Produkt, 	Month, 	Value
a, 	1, 	2
a, 	2, 	4
b, 	1, 	20
b, 	2, 	25
b, 	3, 	30
];

Tab2:
Load Distinct Produkt as Prod Resident Tab;
Join
Load Distinct "Month" as MOn Resident Tab;


NoConcatenate
Tab3:
load *,

AutoNumber(Prod&MOn) as _KEY

Resident Tab2;

Drop Table Tab2;

 Output:

Rockstar7_0-1662893130299.png

 

beck_bakytbek
Master
Master
Author

@Rockstar7  

thank you very much for your help and your time, i will implement it in my issue and will let you know whether i achieve the expected output (mark your idea as solution)

Thanks a lot

Bek

 

beck_bakytbek
Master
Master
Author

@Rockstar7  Thank you very much for your help and your valuable time

Bek