Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

ranges between two values

hi all,I am new to QLIKVIEW.

how to differentiate ranges in qlikview,

My requirement is,ihave a table like shown below

Resource   month Allocation_Value

kishore       jan        1

srikanth      jan      0.8

raj              jan      1.25

shilpa         jan      0.5

sravani       jan      1

ram            jan      1.11


I want to see the,how many resources allocated between these ranges like (>=0.8 and <=1),(>=1 and<=1.15),(>=1.15 and <1.30)

in a different text objects.

Can you Please help on these,

Regards,

Sruthi Reddy

7 Replies
robert_mika
Master III
Master III

One of many

load * Inline [

Resource,   month, Allocation_Value

kishore       ,jan,        1

srikanth      ,jan ,     0.8

raj            ,  jan ,     1.25

shilpa         ,jan    ,  0.5

sravani       ,jan      ,1

ram           , jan      ,1.11

];

join(t1)

t2:

load

Resource,

If (  Allocation_Value >=0.8 and  Allocation_Value<=1,'>=0.8 and <=1',if(Allocation_Value>=1

and Allocation_Value<=1.15,'>1 and<=1.15',if(Allocation_Value>=1.15 and Allocation_Value<1.30,'>=1.15 and <1.30','not categorized'))) as Category

Resident t1;

15-Apr-15 1-05-41 PM.jpg

Then you can count in Straight table

15-Apr-15 1-45-18 PM.jpg

I have used  "load inline " method to get your data but you can do that on data loaded from your sources.

anbu1984
Master III
Master III

Try this expr in Text box

='Count of resources allocated >=0.8 and <=1 : ' & Count(If(Allocation_Value >=0.8 and Allocation_Value <=1,Resource))

ali_hijazi
Partner - Master II
Partner - Master II

count({<Allocation_Value={">=0.8 <=1"}>} Resource)

or you can assign ranges to variables and your expression would be

count({<Allocation_Value={">=$(From) <=$(To)"}>}Resource)

I can walk on water when it freezes
buzzy996
Master II
Master II

Try these expressions,

Text Box1---

IF(Allocation_Value >=0.8 and  Allocation_Value<=1,Count(Allocation_Value),null())

Text Box2---

IF(Allocation_Value>1 and Allocation_Value<=1.15,Count(Allocation_Value),null())

Text Box3---

IF(Allocation_Value>1.5 and Allocation_Value<=1.30,Count(Allocation_Value),null())

Not applicable
Author

@

Hi Robert Mika,

Thanks for your Reply,I want to write  expression in textobject

Data is,

Resourcemonthallocationproject
kishorejan1project1
kishorejan0.25project2
rajjan0.1project1
srikanthjan0.8project1
rajjan1.25project2
shilpajan0.5project1
sravanijan1project1
ramjan1.11project2

My requirement is when resource handling more than 1 project in a month then i want to see the sum of  allocation value of resource eg(

resource=kishore,Project1=1

                          Project2=.25,

final o/p will be:1.25

range >1 to <=1.5

Can you please find the attachment of qvw

Regards,

Sruthi Reddy

! !

Not applicable
Author

Hi Anbu Cheliyan,

Thanks for your Reply,

My Data is,

Resourcemonthallocationproject
kishorejan1project1
kishorejan0.25project2
rajjan0.1project1
srikanthjan0.8project1
rajjan1.25project2
shilpajan0.5project1
sravanijan1project1
ramjan1.11project2

My requirement is when resource handling more than 1 project in a month then i want to see the sum of  allocation value of resource eg(

resource=kishore,Project1=1

                          Project2=.25,

final o/p will be:1.25

range >1 to <=1.5

Can you please find the attachment of qvw

Regards,

Sruthi Reddy

Not applicable
Author

Please look into interval match function by defining the minimum and maximum range and pass your fact into the function which will automatically do for you.

Thanks,

Sai