Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can I show and hide columns in a pivot table in the same expression?
Ex:
Dimension Year (2010,2011,2012,2013,2014)
Expresion 1 Sales (values for all the years)
Expresion 2 Budget (only contains values of 2014)
In the pivot table:
I like to hide the column Bugdet for 2010,2011,2012,2013.
Is it possible? when all the years are selected?
Thx
Hi Jordi,
I've got the same doubt. I can hide an expression setting a condition, but it hides the expression for all the existing values of the dimension.
I doubt if there's any way to hide/show an expression only for some values of the dimension.
Cheers,
Hi,
1) You need to display only 2014 Budget value always?
2) What value you required if you select 2013 or 2012,2013 in Year?
Hi Ashwani,
1) Yes
Years | 2011 | 2012 | 2013 | 2014 | ||||
---|---|---|---|---|---|---|---|---|
Clase | Sales | Budget | Sales | Budget | Sales | Budget | Sales | Budget |
C | 98397319 | 0 | 119472660 | 0 | 129192973 | 0 | 45030540 | 59282337 |
E | 1606566 | 0 | 1171276 | 0 | 676018 | 0 | 198444 | 300860 |
F | 15861210 | 0 | 18861575 | 0 | 13406133 | 0 | 5102001 | 6591374 |
J | 5874076 | 0 | 8090664 | 0 | 6449241 | 0 | 3765434 | 2427444 |
T | 3134487 | 0 | 2571200 | 0 | 990952 | 0 | 60894 | 351485 |
1 | 13585744 | 0 | 10881713 | 0 | 12994230 | 0 | 6134890 | 5529503 |
2 | 18547295 | 0 | 13185955 | 0 | 17361990 | 0 | 5155422 | 65891 |
I like this, without the column budget in the years 2011,2012 and 2013.
Thx.
hi
sorry but you can't hide columns just for some values of the diemnsion
it either shows on all values or hidden for all values in pivot table
Hi,
Try something like this for the budget expression. This will give the budget value only for 2014 year when u select all the year or if nothing is selected (no selection in a field implies everything as selected). If anyother year is selected it will give the budget value for that specific year.
=if(getSelectedCount(year)=5 or GetSelectedCount(year)=0,sum({<yeah={2014}>}budget),sum(budget))
Hi preethi,
Doesn't work.
I have attached the sample which works - qv result.qvw. Please check. Please note this works only when u select everything or nothing. If you seelct a particular yr or a combination of years other than everything it will not.
There is another samle qv result1.qvw which works when u select everything or nothing and also any combination of 2014 with other yrs. But if select only other years without including 2014 then it gives you the values for other years.
This expr is:
=if(GetFieldSelections(year) like '*2014*' or GetSelectedCount(year)=0,sum({<year={2014}>}budget),sum(budget))