Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
HI All,
I have been searching on the community and have found similar examples but nothing that will quite do what I require.
Benchmark data
load *
inline
[
Product, Type, P, Z
Banana, T1, 100, 0.4
Banana, T2, 0, 0.6
];
Formula for distribution
if(Type= 'T1', Sum({<Type= {'T1'}>}P)*only({<Type= {'T1'}>}Z),
if(Type= 'T2', Sum({<Type= {'T2'}>}P)*only({<Type= {'T2'}>}Z) ,1))
But I can not distribute where there is no source data.
I will appreciate any help.
Thank You
Try this?
If(Type= 'T1', Sum({<Type= {'T1'}>} P*Z), If(Type= 'T2', Sum({<Type= {'T2'}>}P*Z), 1))
Or
Pick(Match(Type, 'T1', 'T2')+1, Sum({<Type= {'T1'}>} P*Z), Sum({<Type= {'T2'}>}P*Z), 1)
It doesn't work either.
What is the O/P you want to see? and where are you trying?
QlikView 11,20, Summary Table .
Т1 = 100 * 0,4 = 40
Т2 = 100 * 0,6 = 60