Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Set analysis not bringing through data

Hi

I have an issue with set analysis

I have cloned charts one uses this expression and it is working fine

count(distinct(if(MeterType = 'K' and ExpectedConsumption = 0 ,UnitNo)))

The other chart I have the following set analysis, the syntax seems to be OK but it is just giving me no data to display

Count(distinct{$<MeterType = {"K"} , ExpectedConsumption = {0} > } UnitNo)

What am I doing wrong. the value in ExpectedConsumption  comes from SQL where it is a numeric(5,3)

1 Solution

Accepted Solutions
simone_spanio
Valued Contributor

Re: Set analysis not bringing through data

Hi,

changing to

count({ $<[MeterType]={'K'}, [ExpectedConsumption]={0.000}>}  DISTINCT UnitNo)

it works, so the problem is in the ExpectedConsumption format

Hi

S.

9 Replies

Re: Set analysis not bringing through data

try with

Count({$ <MeterType = {'K'} , ExpectedConsumption = {'0'} > } Distinct UnitNo)

Re: Set analysis not bringing through data

Looks ok to me at first glance. Can you post a qlikview document that demonstrates the problem?


talk is cheap, supply exceeds demand
Not applicable

Re: Set analysis not bringing through data

Not working sorry

Not applicable

Re: Set analysis not bringing through data

how do I shrink it enough to only show certain records?

giakoum
Honored Contributor II

Re: Set analysis not bringing through data

Make some selections first and then

File --> reduce data

Not applicable

Re: Set analysis not bringing through data

Check the data cleansing tab, you will see one with no data and the other with data

simone_spanio
Valued Contributor

Re: Set analysis not bringing through data

Hi,

changing to

count({ $<[MeterType]={'K'}, [ExpectedConsumption]={0.000}>}  DISTINCT UnitNo)

it works, so the problem is in the ExpectedConsumption format

Hi

S.

Not applicable

Re: Set analysis not bringing through data

Thanks a million, can you explain why mine was not working and yours, so so I understand exactly what the issue is

simone_spanio
Valued Contributor

Re: Set analysis not bringing through data

I think that the format in which ExpectedConsumption field iid not recognize as a number by set analysis, but not sure.

If you try to create a chart with sum(ExpectedConumption) as expression you get 0.000, if sum(ExpectedConumption)*1 you get 0.


S.

Community Browser