Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik community!
I need to sum only if Brand is 1. I'm using 2023 as CurYear and 12 as CurMonth. Answer should be 3,250. However, it is adding all 2023. This is the formula I'm using:
Could you please tell me what I'm doing wrong?
Try this
sum({$<[Brand]={'1'}, Year={'$(CurYear)'}, Month={'$(CurMonth)'}>}qty)
Try separating all set modifiers with a comma similar to below. (I noticed that you did not do it for Brand in your example.
SUM({<Brand={1}, Date.autocalendar.Year={$(vCurYear)}, Field={'Value'}, etc...>}Quantity)
Please also take a look at your month variable and confirm that the value can be compared to the values in the month field you are using. In your text you write the value is 12, but in the image the month looks like a date value.
Try this
sum({$<[Brand]={'1'}, Year={'$(CurYear)'}, Month={'$(CurMonth)'}>}qty)
It worked! Thank you!