Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i need to create staked bar chart , need to show sum(volume) of current year and previous year, need to show sum(sales) of current year and previous year for customers. based on selection of cust0mer it should filter the data. i shared the sample picture how i need, Kindly help to how to do that. it tis little urgent also
Hi
you can refer below,
data used "
tab:
load * Inline [
Date,Sales,Volume
1/1/2022,1000,1212
21/2/2022,550,7878
30/3/2022,4544,3576
4/4/2022,879,3434
23/4/2023,7676,1867
1/4/2023,6875,1454
30/5/2023,3422,353
12/9/2023,5666,35
23/12/2023,343434,66
];
"
@durgesh22 , i need both 2022 and 2023 sales in one bar, both volume 2022 and 2023 in one bar, not like 2022 cm2 and volume in one bar and 2023 sales and volume in one bar help me with these
As below
Use a Bar Chart:
Dimension
=valuelist('Sales','Volume')
Bars:
=yearIS
Measure:
=if(valuelist('Sales','Volume')='Sales'
,Sum(Sales)
,if(valuelist('Sales','Volume')='Volume'
,Sum(Volume)
))
sample data
tab:
load date#(Date,'DD/MM/YYYY') as dateIS,year(date#(Date,'DD/MM/YYYY')) as yearIS,Sales,Volume Inline [
Date,Sales,Volume
1/1/2022,1000,1212
21/2/2022,550,7878
30/3/2022,4544,3576
4/4/2022,879,3434
23/4/2023,7676,1867
1/4/2023,6875,1454
30/5/2023,3422,353
12/9/2023,5666,35
23/12/2023,343434,66
];
@vinieme12 , Kindly give above sample qvf file
@vienueme , Thanks for the reply,
, i can able to do, still the problem is, if comparison of data, if we take previous it will all months data(jan to dec), but current year it will not complete whole year, , it should consider like for ex current month november, it show show data, jan to nov 2023 and jan to november2022. it should take
just create a flag field in your master calendar to flag ytd months and use that in set analysis
Example
sum{<ytd_flag={1}>} Sales)
there is plenty of content on the community on how to do ytd calculations, I’d suggest using the search bar on the community page
if your original query is resolved then kindly close this thread