Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello!
I'm trying to create a monthly bar chart with the current year's target line and bars for previous years. Is this doable in qlik sense?
thanks!
@jdy_isl I would do it as below
create one inline table
Load * Inline [
Dim
1
2
3 ];
Create a Bar chart with below dimension. Assuming you have created Year and Month fields in your application. where Month is created in the calendar script as Date(monthstart(SalesDate),'MMMM').
=pick(Dim,'Target '& $(=max(Year)-2),'Target '& $(=max(Year)-1),date(Month,'MMMM'))
Below expression
=pick(Dim,
sum({<Year={"$(=max(Year)-2)"}>}Target),
sum({<Year={"$(=max(Year)-1)"}>}Target),
sum({<Year={"$(=max(Year))"}>}Actual))
Go to Chart properties -> Add-Ons-> Reference lines -> Reference lines expression -> add below expression
=sum({<Year={"$(=max(Year))"}>}Target)
Note: Change your expression according to your data and requirements
oh, cool! Thank you for your suggestions @Kushal_Chawda!
I will try this one out. Cheers!
@jdy_isl Just made dimension also dynamic in my last reply. check out