Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Partner
Partner

Mashup using DateRangePicker Exten, get calender and how we can get the start date and End date

Mashup using DateRangePicker Exten, get calender and how we can get the start date and End date value in using mashup?

we using DateRangePicker Extension:

mashup how we can get date difference ?

calender.png

1 Solution

Accepted Solutions
Partner
Partner

Re: Mashup using DateRangePicker Exten, get calender and how we can get the start date and End date

Answer : We can use Hyper Cub we can get the details

app.createCube({

                         "qInitialDataFetch": [

                    {

                        "qHeight": 20,

                        "qWidth": 1

                    }

                         ],

                         "qDimensions": [],

                         "qMeasures": [

                    {

                        "qDef": {

                            "qDef": "=Date(max([%Date]))-Date(min([%Date]))"

                        },

                        "qLabel": "=Date(max([%Date]))-Date(min([%Date]))",

                        "qLibraryId": null,

                        "qSortBy": {

                            "qSortByState": 0,

                            "qSortByFrequency": 0,

                            "qSortByNumeric": 0,

                            "qSortByAscii": 1,

                            "qSortByLoadOrder": 0,

                            "qSortByExpression": 0,

                            "qExpression": {

                                "qv": " "

                            }

                        }

                    }

                         ],

                         "qSuppressZero": false,

                         "qSuppressMissing": false,

                         "qMode": "S",

                         "qInterColumnSortOrder": [],

                         "qStateName": "$"

                       }, load_data);


function load_data(reply, app) {

    console.log("calculated value");

    var days = reply.qHyperCube.qDataPages[0].qMatrix[0][0].qText;

    console.log("output");

    console.log(days);

}

var days In the variable we can get the date differance from start date and end date


1 Reply
Partner
Partner

Re: Mashup using DateRangePicker Exten, get calender and how we can get the start date and End date

Answer : We can use Hyper Cub we can get the details

app.createCube({

                         "qInitialDataFetch": [

                    {

                        "qHeight": 20,

                        "qWidth": 1

                    }

                         ],

                         "qDimensions": [],

                         "qMeasures": [

                    {

                        "qDef": {

                            "qDef": "=Date(max([%Date]))-Date(min([%Date]))"

                        },

                        "qLabel": "=Date(max([%Date]))-Date(min([%Date]))",

                        "qLibraryId": null,

                        "qSortBy": {

                            "qSortByState": 0,

                            "qSortByFrequency": 0,

                            "qSortByNumeric": 0,

                            "qSortByAscii": 1,

                            "qSortByLoadOrder": 0,

                            "qSortByExpression": 0,

                            "qExpression": {

                                "qv": " "

                            }

                        }

                    }

                         ],

                         "qSuppressZero": false,

                         "qSuppressMissing": false,

                         "qMode": "S",

                         "qInterColumnSortOrder": [],

                         "qStateName": "$"

                       }, load_data);


function load_data(reply, app) {

    console.log("calculated value");

    var days = reply.qHyperCube.qDataPages[0].qMatrix[0][0].qText;

    console.log("output");

    console.log(days);

}

var days In the variable we can get the date differance from start date and end date