Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sourabh808
Contributor II
Contributor II

.Net SDK to extract Master Dimensions and Measures from Qliksense Application

Hi,

I have connected to a particular Qliksense application and now am able to extract sheets, properties of each object on sheet.

Can anyone help to extract the Master Dimension and Measures from the application.

Thanks,

Sourabh

Labels (3)
5 Replies
Prashant_Naik
Partner - Creator II
Partner - Creator II

Hi,

This might help you

https://community.qlik.com/t5/Qlik-Sense-Integration/QlikSense-Net-SDK-Retrieve-chart-dimensions-and...

or

create a Session object

{
"method": "CreateSessionObject",
"handle": 1,
"params": [
{
"qInfo": {
"qType": "MeasureList"
},
"qMeasureListDef": {
"qType": "measure",
"qData": {
"title": "/title",
"tags": "/tags"
}
}
}
],
"outKey": -1,
"id": 5
}

Same for Dimension too with following updates

"qInfo": {
"qType": "DimensionList"
},
"qDimensionListDef": {
"qType": "dimension",

and call for getlayout() function

{
"method": "GetLayout",
"handle": 2,
"params": [],
"outKey": -1,
"id": 4
}

you will get the list of measures and dimensions

Tip : Qlik Dev-hub will help you with the same steps i suggested you 

Hope it will helpful 🙂

Regards,

Prashant

Øystein_Kolsrud
Employee
Employee

An example of how to list master measures can be found here:

https://github.com/kolsrud/qlik-dot-net-sdk-hypercube-usage/blob/master/HypercubeUsage/Program.cs#L1...

Similar process for master dimensions...

Prashant_Naik
Partner - Creator II
Partner - Creator II

sourabh808
Contributor II
Contributor II
Author

Thank you for your responses.

I was able to extract the master items, but i am now stuck how do we get the expressions for the particular master dimension/ measure.

 

Øystein_Kolsrud
Employee
Employee

Once you have opened the master dimension/measure, then you can access the definition through it's properties. Something like this:

var masterMeasure = app.GetGenericMeasure(<the id of the master measure>);
var measure = masterMeasure.Properties.Measure;
Console.WriteLine(measure.Def);