Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
We want to create a report using similar function as levels, but have them displayed horizontally
(So the data would grow Left to Right rather than the standard Top to Bottom)
For example, while the standard Levels could create tables such as below which expands vertically,
Country A - Currency a - Population aa
Country B - Currency b - Population bb
Country C - Currency c - Population cc
.
.
.
We want them expand horizontally, like
Country A Country B Country C
Currency a Currency b Currency c
Population aa Population bb Population cc ................
Looking at the past forum QAs, I see that Nprinting didn't support this functionality a few years ago,
but wanted to know if this is still the case
If not, could someone please advise any idea to realize these ?
(We've also explored PixelPerfect but we found it difficult to create a team that could support maintenance in the long term)
Please kindly let me know if there's any other info to be provided from my end, Thank you!
Perhaps this example can be useful. I loaded the test script that you get from pressing "ctrl 0 0" in script editor and I'm using the table "ASCII" in this example. The top table shows the contents of that table, the bottom table is hopefully what you want to achieve.
I'm using a pivot table. The row dimension is this expression: =valuelist('The alpha value','The num value')
As column dimension I used the field Num (that would be Country with your data).
The value expression is:
=pick(match(Valuelist('The alpha value','The num value'),'The alpha value','The num value'),AsciiAlpha,AsciiNum)
The row dimension will iterate over the values given to the valuelist function. The value expression checks each value in the valuelist, and if the value matches the value in the row dimension (the row valuelist), the correct field will be used.
Hi I have this script for pivoting crosstable. This is good guide The Generic Load - Qlik Community - 1473470.
Set vListOfTables = ;
For vTableNo = 0 to NoOfTables()
Let vTableName = TableName($(vTableNo)) ;
If Subfield(vTableName,'.',1)='Generic' Then
Let vListOfTables = vListOfTables & If(Len(vListOfTables)>0,',') & Chr(39) & vTableName & Chr(39) ;
End If
Next vTableNo
CombinedGenericTable:
Load distinct [GlobalName] Resident data_loaded
/*From Generic */
/*RESIDENT '$(vTableName)' */
/*FROM [lib://EMARK:DataFiles/SCEP_LineUp_2023_05.xlsx]*/
;
For each vTableName in $(vListOfTables)
/*Left*/OUTER Join (CombinedGenericTable) Load * Resident [$(vTableName)];
Drop Table [$(vTableName)];
Next vTableName
Perhaps this example can be useful. I loaded the test script that you get from pressing "ctrl 0 0" in script editor and I'm using the table "ASCII" in this example. The top table shows the contents of that table, the bottom table is hopefully what you want to achieve.
I'm using a pivot table. The row dimension is this expression: =valuelist('The alpha value','The num value')
As column dimension I used the field Num (that would be Country with your data).
The value expression is:
=pick(match(Valuelist('The alpha value','The num value'),'The alpha value','The num value'),AsciiAlpha,AsciiNum)
The row dimension will iterate over the values given to the valuelist function. The value expression checks each value in the valuelist, and if the value matches the value in the row dimension (the row valuelist), the correct field will be used.