Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Stock coverage report

Hi!

I have some troubles at this report.

case.png

1 - (blue squares) Stock at Totals is Sum(), can i put last-month value to totals?

2 - (red squares) Cant calculate Stock Coverage value, it need: current-month stock / next-3-month sellout


Can someone help me?

Labels (1)
1 Reply
Not applicable
Author

First question is ok.

solution: //in this case last month of year is March

IF(Count(DISTINCT [Calendar Month])=3

     ,sum({<[Calendar Month]={'Jun','Sep','Dec','Mar'}>} Val)

     ,IF(Count(DISTINCT [Calendar Month])=12

          ,sum({<[Calendar Month]={'Mar'}>} Val)

          ,sum(Val)

     )

)

isnt best solution, but work fine.

still lookin' for second answer.