Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
brijeshvma
Partner - Creator
Partner - Creator

Create Price Range from text and number format

Hi All i have data like,

 

{"max":"10000000","min":"2500000"}
{"max":"10000000","min":"5000000"}
{"max":1}
{"max":2,"min":1}
{"max":2}
{"max":5}
{"max":6,"min":3}
{"max":6,"min":4}
{"max":7,"min":6}

{"max":8}

but i want to create a price range based on the max value .. Sau 0 - 2500000, 2500001-5000000and so on

so say example if say {"max":"10000000","min":"2500000"} this is a value so comes in range  7500000 - 10000000.

kinldy help me to achieve this.

i am attaching a sample data and qvw for this

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

INPUT:

LOAD *,

  Subfield(TextTMP,':',1) as MinMax,

  Subfield(TextTMP,':',2) as Price;

LOAD Filter,

  Recno() as RecID,

  Subfield(PurgeChar(Filter,'"{}'), ',') as TextTMP;

LOAD Filter

FROM

(biff, embedded labels, table is Sheet1$);

LOAD RecID,

  Class(Price, 250000) as Group

Resident INPUT

WHERE MinMax = 'max';

2016-04-16 22_09_33-QlikView x64 - [C__Users_Stefan_Downloads_Price Range.qvw].png

View solution in original post

3 Replies
swuehl
MVP
MVP

Your QVW is empty, is that intended?

Besides this, I haven't really understood how your logic works, could you explain this step by step?

brijeshvma
Partner - Creator
Partner - Creator
Author

HI Swuehl,

i attached a xls file it contain data like that i mention above. its a Price range data .

so if user selected online say 2000000 to 5000000 .. than its shows as {"max":"5000000 ","min":"2000000 "} ,

so i want to create a bar chart with this mention Price range .

say range in 25 lac bracket for above its comes in 2500000 - 5000000 range

swuehl
MVP
MVP

Maybe like

INPUT:

LOAD *,

  Subfield(TextTMP,':',1) as MinMax,

  Subfield(TextTMP,':',2) as Price;

LOAD Filter,

  Recno() as RecID,

  Subfield(PurgeChar(Filter,'"{}'), ',') as TextTMP;

LOAD Filter

FROM

(biff, embedded labels, table is Sheet1$);

LOAD RecID,

  Class(Price, 250000) as Group

Resident INPUT

WHERE MinMax = 'max';

2016-04-16 22_09_33-QlikView x64 - [C__Users_Stefan_Downloads_Price Range.qvw].png