Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Swathi
Creator
Creator

how to calculate totals

i have different types and countries are there , i need totals for each type and countries, some places need total  few rows like that

Swathi_0-1715793015914.png

 

in the above screenshot we can see i have  group, country, type fields are there, for group is Europe, i need all totals Europe group.  as group europe i have  3 types Totals are there one is 

1.TOTAL

2.TOTAL Power

3.TOTAL Gas

TOTAL means summ of all {<Year = {$(vYearSelect)}> } $(vPortfolioValue_mCHF), irrespetive of which type it is. it will summ of all rows for Group='Europe'

TOTAL Power means sum of all {<Year = {$(vYearSelect)}> } $(vPortfolioValue_mCHF), where Group='Europe' and Type ='Power'

 

i tried below formula, but iam not any getting any data it is 0.0 as seen screenshot.

Pick(SrNo,

if(GetFieldSelections (Group)='Europe',
if(Country= 'TOTAL',
{<Year = {$(vYearSelect)}> } $(vPortfolioValue_mCHF),
if(Country='TOTAL Power',
{<Year={$(vYearSelect)},Group={'Europe'},Type={'Power'}>} $(vPortfolioValue_mCHF),
if(Country='TOTAL Gas',
{<Year={$(vYearSelect)},Group={'Europe'},Type={'Natgas'}>} $(vPortfolioValue_mCHF)

)
)

)

),{<Year={$(vYearSelect)},Group={'Europe'}>} $(vPortfolioValue_mCHF))

variable  formula is

$(vPortfolioValue_mCHF),= 

num(Sum(((ConsumptionForecast
*
(HedgeableCapacitiesTotal
*
If(ConsumptionForecast<>0,
If(AveragePriceUnhedgedFWD <> 0 and AveragePriceUnhedgedFWD <> '',
AveragePriceUnhedgedFWD - [FinancialImpactP&LMtminK] * 1000 / ConsumptionForecast,
MarketPrices - [FinancialImpactP&LMtminK] * 1000 / ConsumptionForecast),0)))
/HedgeableCapacitiesTotal)

/(1*1000000)) * Sum(Blended),'#0.0')

Kindly help to get these  it's very urgent and important.

Labels (2)
1 Reply
Anil_Babu_Samineni

We recommend to start with sample dummy application if your data is so sensitive and send it to us the QVF to look. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful