
Re: Calculate using 'only'/'distinct'
Petter Skjolden Jan 14, 2018 6:14 AM (in response to Exobase Online)
Re: Calculate using 'only'/'distinct'
Exobase Online Jan 14, 2018 6:23 AM (in response to Petter Skjolden )Thanks for the answer which was very usefull.
But as I see it it will only make the calculation for City A.
I need an expression working for City B, City C ect. (all cities actually).
How do I that ?

Re: Calculate using 'only'/'distinct'
Petter Skjolden Jan 14, 2018 8:20 AM (in response to Exobase Online)
Re: Calculate using 'only'/'distinct'
Exobase Online Jan 16, 2018 2:04 PM (in response to Petter Skjolden )Hi Petter,
Thanks  this is still pretty new to my. I'm not sure how to deal with you're solution.
I makes a variable called v3 (egual 100%) ?
And how to deal with the expression:
sum(distinct{<Uniq_ID={"=Len(MaxString(Kommune))>0"}>}weight) /
sum(total distinct{<Uniq_ID={"=Len(MaxString(Kommune))>0"}>}weight)

Re: Calculate using 'only'/'distinct'
Petter Skjolden Jan 17, 2018 10:31 AM (in response to Exobase Online)You don't need to use a variable at all. It is only used as a placeholder for the expression so the expression can be used in more than one sheet object/chart without having to rewrite the entire expression.
You can just as well add the entire expression into the expression property of the table:
Sum( DISTINCT {<Uniq_ID={"=Len(MaxString(Kommune))>0"}>} weight ) / Sum(TOTAL DISTINCT {<Uniq_ID={"=Len(MaxString(Kommune))>0"}>} weight )
The 100% is just a sum of all the row expression results which naturally will add up to 100% as it should.



