Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
RimDataAnalyst
Contributor III
Contributor III

sum for value dimensions

Hello , 

 

I want to sum the value  for some alerts status and not the all alerts status : i tried this two formula and it's null every time :

sum((if( Match([Alert Status], 'Ready for exposure','Test') , [part_va.Market_segment_value])))
sum({$<[Alert Status] = {'Ready for exposure','Test'}>}[part_va.Market_segment_value])

someone can help me please i have to calculate it in the sheet and not the loading data .

Best regards 

Labels (3)
6 Replies
BrunPierre
Partner - Master
Partner - Master

These may be

sum((if( Wildmatch([Alert Status], '*Ready for exposure*','*Test*') , [part_va.Market_segment_value])))

sum({$<[Alert Status] = {"*Ready for exposure*","*Test*"}>}[part_va.Market_segment_value])

 

RimDataAnalyst
Contributor III
Contributor III
Author

unfortunately it doesn't work 

vinieme12
Champion III
Champion III

The below expression is correct, but a few things to check would be

sum({$<[Alert Status] = {'Ready for exposure','Test'}>}[part_va.Market_segment_value])

1) is [part_va.Market_segment_value] a numeric column?

2) are there blank space characters in the values of [Alert Status] field "  Ready for exposure   "

Try to trim the extra spaces from the field values during data load as  below

trim([Alert Status]) as [Alert Status]

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
BrunPierre
Partner - Master
Partner - Master

Try using Maxstring and Trim([Alert Status])

RimDataAnalyst
Contributor III
Contributor III
Author

yes [part_va.Market_segment_value] is a numeric value  

and yes there blan space between the  Alert and status fot [Alert Status] it s a rule that we defined to put the dimension betwen [] . i already present the value by the different Alert status here : 

RimDataAnalyst_0-1662621028572.png

and it works now i need a numeric kpi with the value for the last three status 

vinieme12
Champion III
Champion III

I'm not referring to the blank space between Alert and status

rather the blank space characters that may be present in the values of that field[Alert Status]

the string 'Ready for exposure'  will never match with a string that has leading and trailing  blank space characters '  Ready for exposure  '

 

Makes Sense?

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.