Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alan_grn
Creator II
Creator II

Custom property in Qlik Sense measure

Can someone please share with me how to create a custom property on a measure in Qlik Sense.

I have been able to create custom properties in the Appearance section but now would like to have a property against a measure.

I am looking for a switch of On / Off. If On then 2 test boxes are to be display for a min value and a max value.

Something similar to how the Formatting switch works would also be a good example.

1 Reply
Anonymous
Not applicable

I got to do something like that. I was not able to get the minimum and maximum based on the measure.

primaryAxis :{

                type: "items",

                label: "Primary axis",

items:{

range: {        

                        ref: "properties.primaryAxis.range",

                        component: "switch",

                        options: [

{ value: true, label: "Custom" },

{ value: false, label: "Auto" }

],

                        label: "Range",

                        type: "boolean",

                        defaultValue: false

                    },

/*customRangeType: {  

                        type: "string",

                        component: "dropdown",

                        label: "",

                        ref: "properties.primaryAxis.customRange.type",

                        options: [

                            { value:"min", label:"Min", tooltip:"Min"},

{ value:"max", label:"Max", tooltip:"Max"},

                            { value:"min/max", label:"Max", tooltip:"Min/Max"}

                        ],

                        defaultValue:"min/max",

//show:function(e){ return false || true; } <---funciona assim

show:function(e){ return e.properties.primaryAxis !== undefined && e.properties.primaryAxis.range === false; }

                    },*/

                    customRangeMin: {       

                        ref: "properties.primaryAxis.customRange.min",

                        type: "integer",

                        label: "Min",

                        expression: "optional",

                        defaultValue: 0,

//show:function(e){ return e.properties.primaryAxis !== undefined && (e.properties.primaryAxis.customRange.type === "min" || e.properties.primaryAxis.customRange.type === "min/max") ; }

show:function(e){ return e.properties.primaryAxis !== undefined && e.properties.primaryAxis.range === true; }

},

customRangeMax: {      

                        ref: "properties.primaryAxis.customRange.max",

                        type: "integer",

                        label: "Max",

                        expression: "optional",

                        defaultValue: 0,

//show:function(e){ return e.properties.primaryAxis !== undefined && (e.properties.primaryAxis.customRange.type === "max" || e.properties.primaryAxis.customRange.type === "min/max") ; }

show:function(e){ return e.properties.primaryAxis !== undefined && e.properties.primaryAxis.range === true; }

}

}

},