Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I create straight table in qlikview . I want to display my straight table dynamically according to my selections. like this
If I select march then display my straight table Jan feb mar.like below.
Listbox |
---|
Jan |
Feb |
Mar |
apr |
may |
jun |
Straight table.
Country | Jan | Feb | mar |
---|---|---|---|
India | 12000 | 15000 | 20000 |
Uk | 15000 | 20000 | 25000 |
Aus | 20000 | 25000 | 30000 |
If I select Feb then display Like this :it show only jan and feb .
country | Jan | Feb |
---|---|---|
India | 12000 | 15000 |
Uk | 15000 | 20000 |
aus | 20000 | 25000 |
I wrote condition like this =WildMatch(Concat(month,'/'),'Jan') but It does not work. pls tell me out how display straight table like above
Thankyou,
Regards
madhu
Hi,
please explain, how your straight table shows month field values in columns?
Do you have seperate expressions (per month) or did you mean a pivot table instead of a straight table?
thanks
regards
Marco
see attached .qvw
Thank you Massimo grossi.
I use personal edition .I can not open your attached qvw pls send screen shots or explain with small example .
Regards
madhu
Do you want something like the attached? (PFA)
Best,
Sunny
Since you use personal edition try this:
Script used:
Table:
LOAD * Inline [
Country, Month, Value
India, Jan, 12000
India, Feb, 15000
India, Mar, 20000
UK, Jan, 15000
UK, Feb, 20000
UK, Mar, 25000
Aus, Jan, 20000
Aus, Feb, 25000
Aus, Mar, 30000
];
Straight Table with
Dimension: Country
Expression: 1) =Sum({<Month = {'Jan'}>} Value)
2) =Sum({<Month = {'Feb'}>} Value)
3) =Sum({<Month = {'Mar'}>} Value)
With hide and show condition for the expressions
Expression: 1) =SubStringCount(Concat(DISTINCT Month, '|'), 'Jan') = 1 or
SubStringCount(Concat(DISTINCT Month, '|'), 'Feb') = 1 or
SubStringCount(Concat(DISTINCT Month, '|'), 'Mar') = 1
2) =SubStringCount(Concat(DISTINCT Month, '|'), 'Feb') = 1 or
SubStringCount(Concat(DISTINCT Month, '|'), 'Mar') = 1
3) =SubStringCount(Concat(DISTINCT Month, '|'), 'Mar') = 1
Image of where they need to go:
I hope this helps.
Best,
Sunny
Replace my dim (product) with your (country) and MonthNames
SET DateFormat='DD/MM/YYYY';
SET MonthNames='gen;feb;mar;apr;mag;giu;lug;ago;set;ott;nov;dic';
a: load
pick(match(floor(rand()*6+1),1,2,3,4,5,6),'car','bike','bus','plane','train','boat') as product,
'T' & ceil(month(d)/3) as q,
year(d) as y,
date(d) as d,
dual(month(d), num(month(d))) as m,
v;
load
floor(today() -1000 + rand()*2000) as d,
rand()*100-rand()*100 as v
AutoGenerate 10000;
Thankyou marco wedel.I take year 2001 and months jan, feb,march,apr,may. and I wrote expression in conditional box in expression tab like this.
=wildmatch(concat(month,'/')'jan')
=wildmatch(concat(month,'/')'feb')
=wildmatch(concat(month,'/')'mar')
=wildmatch(concat(month,'/')'apr')
when I select year 2001 and month jan I works correctly.but when I select year 2001 and months:jan,feb,march that time I does not display months(it does not work properly) pls tell me out .how to display straight table based on selections pls help me Marco wedel.
Regards
madhu
Thankyou sunindia.