
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
formula in QlikView
Hello Community 🙂 ,
I want to convert 1 excel formula in QlikView I Tried many times but not getting value .
Excel Formula :- =IFERROR(1/COUNTIF([File No.],[@[File No.]]),0)
I Tried :- 1) If(IsNull(Count({<[File No.] = {"$(= [File No.])"}>} [File No.])),0, 1/Count({<[File No.] = {"$(= [File No.])"}>} [File No.])) as booking1,
2) IF(COUNT([File No.]) > 0, 1 / COUNT({< [File No.] = {"$(= [File No.])"} >}), 0) as booking1,
3)IF(LEN([File No.]) = 16,IF(COUNT(DISTINCT [File No.]) = 1,1 / COUNT({<[File No.] = {'$(= [File No.])'}>} DISTINCT [File No.]),0),0) as booking1,
my requirement:-
In this [File No.] field data coming duplicates also so for my requirement I want to satisfy 3 conditions
1)if [File No.] are distinct then count =1,
2) if Duplicates [File No.] are present 1/count [File No.] example 1/2=0.5,1/3=.0.3 ,1/4=.0.25....,
3) if not present [File No.] then put 0,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@inam you need to write the below expression
=alt(if(count(File No.])=1,1,1/count([File No.])),0)
