Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Json like data to table?

Hi Everybody,

I need some help. One of the fields I am supposed to refer to is returning, so called Json like data - please see below. I am looking for a way to create columns with corresponding labels and consisting values. I would like to do this with scripting so that I can connect/display fields to rest of the report.

My data comes from a flat table, not from web etc and each row might have different contents and I cannot use Inline. (please see attached)

Any advice or help will be appreciated.

Best,

What I have in a single cell is:

{"F.13-17":722,"F.18-24":544,"M.18-24":469,"M.13-17":414,"F.25-34":126,"M.25-34":116,"M.35-44":91,"F.35-44":86,"F.45-54":41,"M.45-54":35,"M.55+":19,"F.55+":18,"U.18-24":8,"U.35-44":5,"U.UNKNOWN":4,"U.45-54":3,"U.25-34":2}

What I want is a table like:

F.13-17F.18-24M.18-24M.13-17F.25-34M.25-34M.35-44F.35-44F.45-54M.45-54M.55+F.55+U.18-24U.35-44U.UNKNOWNU.45-54U.25-34
72254446941412611691864135191885432
1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's a solution using subfield() and Generic load.

-Rob

View solution in original post

4 Replies
Not applicable
Author

kind a veird idea but i think it could help you...

Not applicable
Author

Hi Wojciech,

Thanks for your help. It is very helpful. But when I pivot the input data in excel; realized some discrepancy with new QVW output and excel. For example, F.13-17 is summing up correctly but U.UNKNOWN is left as 16 where is shall be 26. I assume this happens because the the values are not in proper order within the given cell or sometimes missing.

But I guess crosstable should be the way to go - although I am not that confident with crosstables yet

Row LabelsSum of Count
F.13-1710919
F.18-248528
F.25-342157
F.35-441482
F.45-54688
F.55+371
M.13-176393
M.18-247608
M.25-342086
M.35-441586
M.45-54620
M.55+361
U.18-24124
U.25-3428
U.35-4483
U.45-5465
U.UNKNOWN26
Grand Total43125

Best,

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Here's a solution using subfield() and Generic load.

-Rob

Not applicable
Author

Hi Rob,

Thank you so much - your help is greatly appreciated. This is exactly what I needed.

Best regards,

piroglu1907