Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ranibosch
Creator
Creator

MODEL DATA ISSUE

Good day,

I have a model with the following 2 tables:

1. Item consumption entries:

YearMonthResponsibility CenterItem NoBU  Quantity
2017MarWRALM001AC- 247,20
2017AprWRALM001AC- 185,40
2017MayWRALM001AC- 275,24
2017MayWRALM001AC- 13,16
2017FebWRCAS001AC- 309,00
2017AprWRCAS001AC- 124,52
2017MayWRCAS001AC- 257,50
2017JunWRCAS001AC- 125,63
2017OctWRCAS001AC- 453,60
2017NovWRCAS001AC453,60

2. Item remaining balance:

Item NoResponsibility CenterWarehouse Stock Balance
CAS001WR680,4
CAS001WR3560,76
ALM001WR8527,68
ALM001WR9752,4
CAS001WR15581,16
ALM001WR15785,28
ALM001WR16261,56
ALM001WR16556,4

From the abovementioned tables/data, I would like to get the following results:

**note that some calculation will happen on a pivot table as expression**


          TABLE 1                                                                                                    TABLE 2

stock coverage results.JPG

1 Solution

Accepted Solutions
shiveshsingh
Master
Master

Try this,

=(Sum (Quantity)/6)*-1

/

Sum ({<Year,Month>}[Warehouse Stock Balance])

If your results are not correct, let me know the logic of your output.

View solution in original post

4 Replies
shiveshsingh
Master
Master

Can you share the app? what expression have you used for calculation.

If you want that expression values doesn't change on month selection, you can bypass month in expression

like {<Month>}

ranibosch
Creator
Creator
Author

Hi Shivesh

please find attached the test model.

I've made the selection as well. You'll see that there will not be any results then.

PrashantSangle

Try below expression.

(Sum (Quantity)/6)*-1

/

Sum (TOTAL<[Responsibility Center]> {<Year=,Month=>}[Warehouse Stock Balance])

If it is not helping you please share base file with formula.

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
shiveshsingh
Master
Master

Try this,

=(Sum (Quantity)/6)*-1

/

Sum ({<Year,Month>}[Warehouse Stock Balance])

If your results are not correct, let me know the logic of your output.