Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I cannot share the QV file but i am explaining a scenario where i am stuck.
There is one field in the data:
TYPE
c1
c2
c3
c4
ANd there is another table in my data like:
c1 c2 c3 c4
1 1 0 1
1 0 1 1
I want a table(on UI) like:
Type sum()
c1 2
c2 1
c3 1
c4 2
So i am trying to use SUM(fieldvalue('Type',RowNo)) function to get the sum. The problem is that QV is not able to identify that the return value of fieldvalue() function is a column name.
You are a savior!
Hi Tresesco,
Your expression worked perfectly for me.
But there is another addition which is required now.
they want the sum where type=1 for that particular type..
if we are calculating sum for say, c1, instead of sum(c1) it should be sum({<c1={1}>}c1).. for c2, sum({<c2={1}>}c2). same for c3, c4 and so on
I avoided creating another discussion because it would lead to confusion.
Can you please help me in the same?
Regards,
Chhavi
Tresesco.. can you help?
Is this specific to C1 only or applicable to all cases?
All cases.
Something like this:
c1 sum({<c1={1}>}c1)..
c2 sum({<c2={1}>}c2)..
c3 sum({<c3={1}>}c3)..
c4 sum({<c4={1}>}c4)..
Try this:
Pick(Match(TYPE,$(=Concat(DISTINCT chr(39)&TYPE&chr(39), ','))),
$(=Concat(DISTINCT 'Sum({<'
&TYPE&
'={1}>}['
&TYPE&'])' ,','))
)
I have already made a variable which is to be used as set analysis
If(GetSelectedCount([Type Indication])>=1,
'{<'&Type&'={1}' &Concat(DISTINCT SubField([Type Indication],':',1)& if( SubField([Type Indication],':',2)=' Require', '={1}','={0}'))&'>}'
)
Adding Type&'={1}' is giving internal error
This variable has been used in the expression u suggested:
Pick(Match(Type,$(=Concat(DISTINCT chr(39)&Type&chr(39), ','))),
$(=Concat(DISTINCT 'Sum($(test)['
&Type&'])' ,','))
)
Hi Chhavi,
If you want me to help with your actual qv, try to share the same with sample data. That would help me help you.
Give me 15 min.. I will update it..