Please find attached file solution. Check Layout tab->Display Conditional section.
test.qvw 148.2 K
first of all u have to creat a bar and pie chart with the same dimension and measure
after creating the two seprate chart go to any one of the chart in the layout tab enable the condition in that write these condition getselectedcount(year)=0 in pie chart and also
write these in getselectedcount(year)>0 in bar chart if u click any one of the chart it will disable the current chart and enable the next one go for it ..it will work