Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Example, I have a field name call City which comprises all the cities all over the world
Firstly, I put this statement on the dimension tab
if(city = 'london','london','Others')
This will tabulate two column, London and Others(All cities exclude London)
However, here is the twist,
My desired output is two columns with London and Others(All including London)
How do I derived this, kinda urgent. Thank you
Try
Dimension : Valuelist('London','Others')
Expression : if(Valuelist('London','Others')='London',
sum({<city={'London'}>}field1),sum({<city={'*'}>}field1))
The {'*'} will be all cities where there is a value. {'*'} also excludes nulls from the calculation
Should give you what you looking for mate
Cheers,
Byron
the first idea I have is:
add another field in the script equal to city, and call it city1 (for example)
then load again and use the second field as another dimesion ... use the condition
if(city = 'london','london',null()) only on the first selection and exclude null values ...
hopemit helps
Hi
if(city = 'london',city,'Others')
this condition gives 2 values for city london and others
if u need these as columns then use pivote table and drag and drop city field on the top of tab.
don't exclude null values, I was wrong ....
the second solutopm, from arya brahma is really good but you have to use a pivot not a straight table
Hi ,
thanks for the prompt reply
Yes i am using pivot table, due to the constraint and complexity of the data. I have to use on the dimension tab.
However the above code mention, i would want the 'others' to include 'london' data.
Hi ,
thanks for the prompt reply
Yes i am using pivot table, due to the constraint and complexity of the data. I have to use on the dimension tab.
However the above code mention, i would want the 'others' to include 'london' data.
Hi ,
thanks for the prompt reply
Yes i am using pivot table, due to the constraint and complexity of the data. I have to use on the dimension tab.
However the above code mention, i would want the 'others' to include 'london' data.
Hi ,
thanks for the prompt reply
Yes i am using pivot table, due to the constraint and complexity of the data. I have to use on the dimension tab.
However the above code mention, i would want the 'others' to include 'london' data.
Hi ,
thanks for the prompt reply
Yes i am using pivot table, due to the constraint and complexity of the data. I have to use on the dimension tab.
However the above code mention, i would want the 'others' to include 'london' data.
*edit am using Pivot table