1 of 1 people found this helpful
Attached is a working workbook. I had to make a few changes to get this working as you wanted. The first, was to put the viz side into context. This makes sure that this is taken into account before the data for the viz is calculated:
You can do that by right clicking the pill and selecting add to context. The next was to create a variable to calculate the maximum consumption per year:
Then I amended your calculation so that it was as follows:
This then gives you the behavior you're after
I've had issues so will post the workbook in a bit.
When I select a particular state, the calculation works fine. The line graphs show the per cent share of that state wrt all the states. But, since my 'Fuel share' pie-chart on the right middle is also synced (I've applied filters via Actions) with the change in states, I'm getting a diff result than expected.
That is, say I select Gujarat, and on the fuel share I select 'Coal & Lignite'. The bar graph in the bottom left shows the consumption of 'Coal & Lignite' in 'Gujarat' over the time range, which is correct. But the line graph which is in dual axis with the bar graph shows the per cent share of Coal & Lignite of Gujarat corresponding to the total energy consumption of that year. (But I wanted the per cent share of coal & Lignite of Gujarat over total consumption of 'coal and lignite' across all states for a year, since we're analysing the trend of a particular state's fuel wrt all the states)
For the above description, I've assumed parameter to be 'Energy Consumed'