Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
Could someone please describe what happened in this dual expression?
=Dual(Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%'), Sum(Quantity))
As far as I know, Dual creates both text and numeric value out of single field/variable, and structure looks like DUAL(text, numeric), however in this expression there are three sections:
(Num(Sum(Quantity), '#,###.') - I guess its going to be first value, integer stored as a text
Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%') - this is going to be second value, numeric, percentage
Sum(Quantity)) - I am completely blunt with this one. This refers to let Y axis be sum of quantity? Just a blind guess.. and without this, the expression has an error. How one could know, it is necessary, can you share knowledge behind this?
Thank you in advance
Hi
Dual function, we need to pass 2 parameter , one is text and another one is num
Based on ur expression,
=Dual(Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%'), Sum(Quantity))
Text: Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%')
Num: Sum(Quantity)
It actually has two sections.
=Dual(Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%'), Sum(Quantity))
Hey
It does not evaluate three things?
I still dont get it . Lets assume in Quantity we have values of 3,2,1
=Dual(Num(Sum(Quantity), '#,###.') - GIVES 6.000. & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%') - GIVES XXX % (this is not mine expression, i didn't brought Market variable), Sum(Quantity) - GIVES 6)
I got 3 results from that query, suppose to get two. How its going?
It does not evaluate three things?
I still dont get it . Lets assume in Quantity we have values of 3,2,1
=Dual(Num(Sum(Quantity), '#,###.') - GIVES 6.000. & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%') - GIVES XXX % (this is not mine expression, i didn't brought Market variable), Sum(Quantity) - GIVES 6)
I got 3 results from that query, suppose to get two. How its going?
Hi
FYI:
Sum(Quantity), '#,###.') - gives 6.00
Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%') - gives XX%
Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%')
gives 6.00 & XX% in text part
End result for your expression is : Dual( 6.00 & XX%, 6)
You're right. What about the part highlighted in red? Without that this expression is wrong (i just changed variables to mine one)
=Dual(Num(Sum(Quantity), '#,###.') & Chr(10) & Num(Sum(Quantity)/Sum(TOTAL <Market> Quantity), '##.##%'), Sum(Quantity))
I see a problem with your expression. The numerical value depends only on the Sum. The text depends on the Sum and the Total<Market>. Generally this won't work.
When creating duals, the following must be observed:
The relationship numerical value -> text value has to be unique. This means different texts cannot be assigned to the same numerical value.
On the other hand: The same text can be assigned to different numerical values.
For example:
TEST1:
LOAD Dual(F1,F2) as Dual1 INLINE [
F1, F2
A, 1
B, 2
C, 3
D, 3
E, 3
];
TEST2:
LOAD Dual(F1,F2) as Dual2 INLINE [
F1, F2
A, 1
B, 2
C, 3
C, 4
C, 5
];
The results:
Hi,
That was expression from other thread
Mine expression is