Discussion board where members can get started with Qlik Sense.
I would make the sum of two fields conditioned by another valueexample :case white
You would use an IF statement for this in Qlik.
Either on load to create a new value or in the measure as an expression assuming white and red are dimension values.
If([Field] = White, sum(1+10), If([Field] = Red, sum(2+20), sum(3+30), 0))) As New Field
You can also combine WildMatch and Pick:
Pick( WildMatch( Color , 'white' , 'red' , '*' )
Sum( 1 + 10 )
, Sum( 2 + 20 )
, Sum( 3 + 20 )
If you have many Cases then best approach is to use Pick() and WildMatch() like below
Pick(WildMatch(FieldName, 'white', 'red', '*'),
Hope this helps you.
could I apply this formula at a total?
Where you want to get the total? If it is straight table select
Properties-> Expression-> Sum of Rows
It is better not to use IF statement for better performance. IF will consume more resources.
excuse me, It wasn't clear.
sum everything except field = VALUE
May be try
If([Field] = 'Value',0,if([Field] = 'White', sum(1+10), If([Field] = 'Red', sum(2+20), sum(3+30)))
Please select Correct Answer and close the thread. Thank you.