Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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?

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.