Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm working with a pivot table having an expression like :
sum(TOTAL <Year,CAT> If(Month='01',Amount))
Some of the users now want to be able to add new dimension (like sub-cat) to the table. The logic thing is to add sub_cat to the expression (after CAT). I need to make the expression handle that.
Do you know if there is any way to get a list of the dimensions used in the table ?
Thanks
If it helps, know that the TOTAL list can include fields that are not in the table. Those additional fields will be ignored until they are in the table. e.g. you can use
sum(TOTAL <Year,CAT,sub-cat,Customer> If(Month='01',Amount))
sub-cat will come into play only when it is in the pivot table.
That said, if you want to build the list dynamically, GetObjectField(n) will return the name of the Dimension at index n.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
If it helps, know that the TOTAL list can include fields that are not in the table. Those additional fields will be ignored until they are in the table. e.g. you can use
sum(TOTAL <Year,CAT,sub-cat,Customer> If(Month='01',Amount))
sub-cat will come into play only when it is in the pivot table.
That said, if you want to build the list dynamically, GetObjectField(n) will return the name of the Dimension at index n.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
I've used a listbox (island table) that has available dimensions to use in your table. If you do this then you can determine which dimensions are in the pivot table with getfieldselections().
If it's "self-service" drag and drop add, I don't know how you can change your expression just by determining which dimensions are used in a table.
Thanks a lot