Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I am trying to develop app for some of my MIS data, as the data is sensitive i have created sample data , which is as follows:
Year | Month | Product | Raw material | Qty. |
2022 | Apr-01 | Plastic | A | 10 |
2022 | Apr-01 | Plastic | B | 15 |
2022 | Apr-01 | Plastic | C | 20 |
2022 | Apr-01 | Plastic | D | 25 |
2022 | Apr-01 | Rubber | D | 30 |
2022 | Apr-01 | Rubber | E | 35 |
2022 | Apr-01 | Rubber | F | 40 |
2022 | Apr-01 | Rubber | G | 45 |
2022 | May-01 | Plastic | A | 15 |
2022 | May-01 | Plastic | B | 20 |
2022 | May-01 | Plastic | C | 25 |
2022 | May-01 | Plastic | D | 30 |
2022 | May-01 | Rubber | D | 35 |
2022 | May-01 | Rubber | E | 40 |
2022 | May-01 | Rubber | F | 45 |
2022 | May-01 | Rubber | G | 50 |
My question is how can we total plastic product raw material wise in Rubber product. I have tried some formula but it does not give correct answer when i select month, below is the detail:
My formula is(in Pivot table, expression):
if(Product='Plastic', Sum(Qty.),if(Product='Rubber', sum( TOTAL <[Raw material]>{<Product={'Plastic'}>} Qty.),1))
When month is not selected it gives correct answer as follows:
Which is total of Plastic product raw material wise(A,B,C,D) for both month Apr & may.
But when i select Month than it gives wrong answer:
What i want is, when Apr & Rubber is selected Rubber column should give below figures(these are Plastic's Raw material figures in Rubber column):
Raw material | Rubber |
A | 10 |
B | 15 |
C | 20 |
D | 25 |
Please help me out for this problem, as i have tried many things but could not succeed.
Thanks in advance.
Regards,
Ashish
@Learner Not sure if I completely understood. Basically rubber doesn't make any sense here, because anyway you are going to show the figures of the plastic for it. It's weird but why don't you just use below set expression for rubber and plastic both
sum({<Product={'Plastic'}>} Qty.)