Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator
Creator

compare count of each string value to a measure

Hi 
Is there a way to compare the count of position of 'a' ,'b','c','d',.......'l' o Compare 1 and color code the text?
rangesum(num(count(distinct left('abcdefghijk','1')))) gives me 1
rangesum(num(count(distinct left('abcdefghijk','2')))) gives me 1
i couldnt figure out how to write a comparison stmt.
is this possible?  
 thanks
 
Labels (4)
5 Replies
MVP & Luminary
MVP & Luminary

I'm afraid I don't understand what you're trying to do. Can you explain in more detail?

talk is cheap, supply exceeds demand
Highlighted

What ever, You done quiet not correct to me as the syntax itself makes wrong. Because, Not sure - Why RangeSum() needed for you?

Perhaps you can try this?

SubStringCount(FieldName, 'A') as Field_A

SubStringCount(FieldName, 'B') as Field_B

SubStringCount(FieldName, 'C') as Field_C

 

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted
Creator
Creator

Hi I am working on posting sample qvf .

thanks
Highlighted
Creator
Creator

I totally agree i may not not be right with syntax , as i said in my earlier reply iam working on qvf,

let me post it and explain it better , I have been working on actual data, I am just struggling on trimming it down to sample and make it clear and simple as much as possible.

thanks .

Highlighted
Creator
Creator

Hi sorry for the delayed reply. By basic need is to get a 100% stacked chart in a table .I think I solved it finally. There is alot of work around though. 

I have a mix a excel  logics  to get the 100 % stacked bar chart. The reason I wanted to use a Range function is I wanted to take 100 cells as we take in excel and  compare the ranges of my measures with that cell range. But didnt know which one to get it .   I tried to replicate this in Qlik. https://trumpexcel.com/stacked-bar-chart-in-excel/.

I figured I have to use Rangeonly function to get the 100% stacked bar chart.

AS 100 % was too much to show in a column I wanted to reduce the %- so 20% stacked is reduced chart. 

droop quota distributions(https://en.wikipedia.org/wiki/Droop_quota)  to reduce it to 20% stacked chart ( as I understand from ruby - How to deal with the sum of rounded percentage not being 100? - Stack Overflow)

How to deal with the sum of rounded percentage not being 100?100% stacked bar chart.png

 

thanks