Skip to main content
Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabbar
Creator III
Creator III

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

Regards, Akash Dhandhi.
If this resolves your Query please like and accept this as an answer.
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
Creator III
Creator III
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

Regards, Akash Dhandhi.
If this resolves your Query please like and accept this as an answer.