on 06-21-2022 4:24 PM
Hi,
Is it possible to create a measure input control in an Application?
In a story I see that option and it works fine but not when I create an application and create the same table based on the same model with the same dimensions and measures.
Thanks in advance.
Gerzon,
You will need scripting to achieve it. Something like below.
// Put this in onInitialization event of the canvas
var measures = Table_1.getDataSource().getMeasures();
var selectedKey = "";
if (measures.length > 0)
{
for (var i = 0; i < measures.length; i++)
{
// Measure
Dropdown_Measures.addItem(measures[i].id,measures[i].description);
if (selectedKey === "" && i === 0) {
selectedKey === measures[i].id;
Dropdown_Measures.setSelectedKey(selectedKey);
//console.log(["selectedKey ", selectedKey]);
}
//console.log(["CurrentMeasure ", measures[i]]);
}
}
// Put this on on select of dropdown
Table_1.getDataSource().setDimensionFilter("Account", selectedKey); // Table_1 is table name and Account is the dimesnion. You can setMeasureFilter if its a measure based model.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes. You can populate a drop down list with all measures. Use the selected measure from drop-down to filter your charts/ table.
Regards
Nikhil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.