Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear experts,
I have Dates(YYYY-MM-DD) as follows,
Date1 Value
2004-04-03 10
2004-06-02 20
2004-11-02 30
2004-03-31 40
2005-04-01 50
2005-10-06 60
2005-03-31 70
2006-04-01 80
2006-06-20 90
2006-10-30 100
Now I want YearWise count of Value in a bar chart.
ex. 2004 - 4
2005 - 3
2006 - 3
Is this Possible by set analysis????
I tried : count({$<Date1 = {'>={$(=min(Date1)) <= {$(=max(Date1))}}'}>}Value)
when no selection is there it will take '2004-04-03' as Min and '2006-10-30' as Max but i want Yearwise in Bar....
Please help on this will be greatly appreciated........
Regards,
Vaibhav
Hi,
Please check the attached file for solution. You can also do this by using Calculated Dimension without adding a new Field(Year).
If you are using Year in multiple widgets just follow what kaushik suggested. The script for adding Year Field is below
Values:
LOAD
Date1,
Value,
Year(Date1);
LOAD * INLINE [
Date1, Value
2004-04-03, 10
2004-06-02, 20
2004-11-02, 30
2004-03-31, 40
2005-04-01, 50
2005-10-06, 60
2005-03-31, 70
2006-04-01, 80
2006-06-20, 90
2006-10-30, 100
];
Regards,
Jagan.
HI,
Just include dimension as =Year(Date)
and expression as count(Value)
Regards,
Kaushik Solanki
Hi,
Please check the attached file for solution. You can also do this by using Calculated Dimension without adding a new Field(Year).
If you are using Year in multiple widgets just follow what kaushik suggested. The script for adding Year Field is below
Values:
LOAD
Date1,
Value,
Year(Date1);
LOAD * INLINE [
Date1, Value
2004-04-03, 10
2004-06-02, 20
2004-11-02, 30
2004-03-31, 40
2005-04-01, 50
2005-10-06, 60
2005-03-31, 70
2006-04-01, 80
2006-06-20, 90
2006-10-30, 100
];
Regards,
Jagan.
Thanks....