Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I'm trying to create a comparison bar chart in qlikview , where it shows the sales between two years, selected year and previous year.
I was able to create the chart for all companies but when I tried to filter the chart to a particular company , I have issue .
This is the First primary expression for the selected year for the company "Abc" - Works fine
sum({<Company.Name={'Abc'}>}[Value])
This is the Second primary expression for the previous year for the company "Abc" - Have Issue Here
Sum({$<Year={$(=max(Year)-1)}>}{<Company.Name={'Abc'}>}[Value])
also tried from this website https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/ but no luck with it either.
Please advice on this regard.
Expected output look. ---
Try like:
=Sum({$<Year={$(=max(Year)-1)} , Company.Name={'Abc'}>}[Value])
If this doesn't work, try to share your sample qvw.
Try like:
=Sum({$<Year={$(=max(Year)-1)} , Company.Name={'Abc'}>}[Value])
If this doesn't work, try to share your sample qvw.
Hello, please try this;
sum(
{$<
Year={"$(=max(Year)-1)"},
Company.Name={'Abc'}
>}
[Value]
)
works perfectly , thank you so much
thanks for the reply