Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabbar
Specialist
Specialist

Use Exclude to remove previous dimension values.

Gabbar_0-1662904825280.png

If i use modifier or rangesum the values add which i want, but i want to count distinct id, so if a id is present in multiple years it gets counted every time and that is not what i want. I want that i a Id is counted in any one year it wont be counted in any of the next years.

Like if the Id is present in 2016-27 then it shouldnt be counted again in any year similary for all IDs in if counted in year 2017-18 not counted in any other years.

also it is possible that some id are present in year like 2017-18 but not in 2018-19 but again in 2019-20, i also want to exclude those.


@sunny_talwar 

@hic 

please help

Labels (1)
2 Replies
hic
Former Employee
Former Employee

This could become a very complex expression in a chart, so I would do that in the data model instead.

For example, if you load your data in chronological order, you could use
Load ...,
   ID,
   If(not Exists(ID),ID) as FirstInstanceOfID,
   ...

and then you can use Count(distinct FirstInstanceOfID) in your chart.

Gabbar
Specialist
Specialist
Author

Sir,

not exist will give null values, so i used
If(Id<>Previous Id,ID) as First Instance of Id

after setting the data in required order.

But it removes some values 

Gabbar_0-1662985249643.png

.

Thanks

Regards

Akash Dhandhi