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: 
akpofureenughwu
Creator III
Creator III

Data Manipulation (Switch Measure for Dimension)

Hello everyone.. I have a set of data in this format...

LocationYearQuarterUAUCRTA
Area 12015Q11212
Area 22015Q11310
Area 12015Q23421
Area 22015Q21321
Area 12015Q31310
Area 22015Q3120

The above table is the Health ,safety and Environment stats for a store with two branches....

I need to represent the data in a pyramid form and a bar chart form.. see attached for clarity..

I don't know how to manipulate the data (using UA, UC as dimension and Quarter as Measures)  see picture

thanks

13 Replies
Digvijay_Singh

Check this may be -

Capture.PNG

Anonymous
Not applicable

yes off course, crosstable load is also an option... but the table must be in a specific format as we know

TEMP:
LOAD * INLINE [
Location, Year, Quarter, UA, UC, RTA
Area 1, 2015, Q1, 12, 1, 2
Area 2, 2015, Q1, 13, 1, 0
Area 1, 2015, Q2, 34, 2, 1
Area 2, 2015, Q2, 13, 2, 1
Area 1, 2015, Q3, 13, 1, 0
Area 2, 2015, Q3, 1, 2, 0
]
;


FINAL:
CrossTable(Type, Value, 3)
LOAD Location,
Quarter,
Year,
RTA,
UA,
UC
Resident TEMP;

DROP Table TEMP;

Digvijay_Singh

Yup, I agree.

akpofureenughwu
Creator III
Creator III
Author

This is great with the use of crosstable I have managed to transfrom 4,000 lines of data ( automatically too)..  but I need to sort my data from (highest to lowest).. used expression.....

Pick(Match(ValueList('UA','UC','RTA'),'UA','UC','RTA'),Sum({<Key={'UA'}>}Value),Sum({<Key={'UC'}>}Value),Sum({<Key={'RTA'}>}Value))

but there was not change?

Thanks