Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have some questions about valuelist() when I use it into a chart, I have data like :
The result that I want should be like :
And I have a idea to use valuelist to solve the problem, but when I create a table and the first dimension is
=ValueList('DFD','DFM')
second dimension is :
=if(ValueList('DFD','DFM')='DimDFD',DFD,DFM)
expression is :
=sum(Count)
it shows wrong, the second dimension can't recognize the valuelist I think,
do you know why or have any other ideas to solve this problem?
Thanks and you can tell me if you have any questions about the example, and you can use the attached.
t1:
LOAD * INLINE [
DFD, DFM, Count
10%, 15%, 1
10%, 25%, 1
20%, 25%, 1
, 35%, 1
, 45%, 1
30%, , 1
40%, , 1
, 45%, 1
, 55%, 1
50%, , 1
];
DFD:
load
'DFD' as LevelName,
DFD as Value,
sum(Count) as C
Resident t1
Where len(DFD)>0
Group by DFD
;
concatenate
DFM:
load
'DFM' as LevelName,
DFM as Value,
sum(Count) as C
Resident t1
Where len(DFM)>0
Group by DFM;
drop table t1
t1:
LOAD * INLINE [
DFD, DFM, Count
10%, 15%, 1
10%, 25%, 1
20%, 25%, 1
, 35%, 1
, 45%, 1
30%, , 1
40%, , 1
, 45%, 1
, 55%, 1
50%, , 1
];
DFD:
load
'DFD' as LevelName,
DFD as Value,
sum(Count) as C
Resident t1
Where len(DFD)>0
Group by DFD
;
concatenate
DFM:
load
'DFM' as LevelName,
DFM as Value,
sum(Count) as C
Resident t1
Where len(DFM)>0
Group by DFM;
drop table t1
Hi Mika,
Thanks for your reply. Your method is great and I will try that.
So do you have any ideas that we can do the table not changing the script?
You will not be able to do that.
Your second dimension does not really make sense
=if(ValueList('DFD','DFM')='DimDFD',DFD,DFM)
how
ValueList('DFD','DFM')='DimDFD'
??
You can not mix synthetic dimension with standard dimension in the way you think.
BTW:
Calcification at script level are always faster.
Refer to this article to clear some fog
Missing Manual - ValueLoop() & ValueList()
OK, thanks!