I want to create a dynamic text (Visual - Enlighten Data Story) that will write the measures X, Y and Z (see pictures below).
X is the Activity that had the most energy consumption on that city (one of those: Industry, Transports, Services, etc etc) Y is the value of that energy consumption Z is the percentage between Y and the Total consumption of that City
For this example, in the City of Porto that text should return:
X = Edificios de Serviços Y = 589.976 Z = 49%
If I select any other city, for example Guimarães:
X = Industria Y = 428.726 Z = 59%
Here is my table:
Looking forward for help. Thank you very much.