cancel
Showing results for 
Search instead for 
Did you mean: 

Filter on key figure structure

xjhacking
Contributor
0 Kudos

I have a BEx Query with a key figure structure in the columns, and I want to use a script (in a Button component) to switch between two of those key figures, while other key figures are also displayed. I got this running using a setFilter method with multiple filter values.

But, the problem is that this key figure structure has also some grouped key figures, and I don't want those sub-level key figures to be displayed. Also see the screenshot. So now if I filter on the MTD - '15 key figure, not only MTD - '15 is shown, but also the four key figures that are grouped below.

How can I only filter on the 'top-level' key figure? Exclusions don't seem to work.

Thanks,

Xavier

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hello Xavier,

Exclusion should actually work by using:

DS_1.setFilterExt(DS_1.getMeasuresDimension(),"!xxxx");

xxx is a placeholder for the ID of the Keyfigure you want to exclude. Only Problem could be a Logical one as selecting the higher node always means that you select all his subnobes.

Hope this helps a bit.

Best Regards,
Dominik

edit:

ok i checked this and i should work for your case! You can exclude all the subkeyfigures and only have the higher Level on with this method.

xjhacking
Contributor
0 Kudos

Thanks Dominik,

I got it running with:

DS_1.setFilterExt(DS_1.getMeasuresDimension(), "!00O2TGKMD4YDMVAAWIW5QYOZ0; !00O2TGKMD4YDMUUVYDADFXIPL; !00O2TGKMD4YFG65ZBQ3CPEFPT; !00O2TGKMD4YDPVRBYDIR3Z5S1");

Still this is a weird way to get this done. Now I have to exclude EVERY key figure I don't want to show, instead of selecting/including just the few I actually do want to see.

/Xavier

Former Member
0 Kudos

Hello Xavier,

That's the standard behavior of Design Studio. When you try to get the filters applied on a data source, it returns with key figures that aren't present in data source with '!' as prefix.

But if you hardcode a filter to a data source using scripting and then try to get the filter value, it returns the value alone that you entered while setting it.

Thanks,

Anand

Answers (0)