Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have some data in the following table and I want to create bar chart in QV with the data in the table
YEAR | TYPE | MAY-JUN-JUL | OTHER-MONTHS |
2013 | A | 40,017,693 | 125,167,132 |
2013 | B | 938,739,804 | 2,474,358,841 |
2013 | C | 23,725,418 | 74,356,983 |
2013 | D | 2,505,441 | 1,104,019 |
2014 | A | 32,453,750 | 127,146,085 |
2014 | B | 819,656,714 | 2,190,669,436 |
2014 | C | 38,339,791 | 105,759,591 |
2014 | D | 214,836,239 | 450,894,057 |
2015 | A | 52,992,681 | 83,557,779 |
2015 | B | 930,098,574 | 2,502,012,638 |
2015 | C | 42,550,921 | 119,393,652 |
2015 | D | 251,770,244 | 613,886,830 |
In the chart I have in my mind I want the following
X axis should represent years and two bars for 1. MAY_JUN_JUL
2. OTHER MONTHS
Two Bars should have relative % amount shown above representing type A B C and D
Pls help me to create this chart with a sample QV document
You have to change the expression...
SUM(CRE_PAID_AMOUNT)/sum(TOTAL <PAID_YEAR,PERIOD>CRE_PAID_AMOUNT)
Try like this :
1.Create a Bar chart > Add Dimension as YEAR and TYPE
2. Add expression 1.sum(MAY-JUN-JUL) >expression label >MAY-JUN-JUL
2.sum(OTHER-MONTHS)> expression label >OTHER-MONTHS
for both the expression check the relative option in the expression tab. Currently I don't have QV licence so could not build a sample app for the same.
Hope this info will help you
Hi,
Try like this
Script:
Temp:
CrossTable(MonthGroup, TempValue, 2)
LOAD *
INLINE [
YEAR, TYPE, MAY-JUN-JUL, OTHER-MONTHS
2013, A, "40,017,693", "125,167,132"
2013, B, "938,739,804", "2,474,358,841"
2013, C, "23,725,418", "74,356,983"
2013, D, "2,505,441", "1,104,019"
2014, A, "32,453,750", "127,146,085"
2014, B, "819,656,714", "2,190,669,436"
2014, C, "38,339,791", "105,759,591"
2014, D, "214,836,239", "450,894,057"
2015, A, "52,992,681", "83,557,779"
2015, B, "930,098,574", "2,502,012,638"
2015, C, "42,550,921", "119,393,652"
2015, D, "251,770,244", "613,886,830"
];
Data:
LOAD
*,
SubField(TempValue, ',') AS Value
RESIDENT Temp;
DROP TABLE Temp;
Chart: Barchar
Dimension: MonthGroup, TYPE
Expression: =Sum(Value)/Sum(TOTAL<MonthGroup> Value)
In Style tab select Stacked and in number tab select Integer and Percentage.
Hope this helps you.
Regards,
jagan.
Thanks
But I have done it the way you have said But the Year does not come into the picture
could you please share the script and the bar expression what you have used so that we could check the same
My sample QV document is attached pls
Hi,
Can you attach sample chart that you required? So that it would be easier to understand.
Regards,
jagan.
T.qvw is attached But I want all bars of 100% in length is it possible ?
Like this?
have you check my reply?