Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need one help here in writing one set analysis expression, I have the same condition in (if function) but i want to rewrite it using set.
here is the function
COUNT(DISTINCT if(isnull(Mother_Board)=FALSE(),TotalNoOfLaptops)).
2nd Question, is it possible for any definition if i write numerator using Set and denominator using if function, will this give me correct result or I have to use set analysis for both nume and deno or if function for both numerator and denominator.
try like this
=If(Count(DISTINCT {<isnull(Mother_Board)={'FALSE()'}>}1),TotalNoOfLaptops)
Thanks for your reply but its not working, and why are we using all the condition inside the if...
COUNT(DISTINCT if(isnull(Mother_Board)=FALSE(),TotalNoOfLaptops))
=
COUNT({$<Mother_Board = {'*'}>}DISTINCT TotalNoOfLaotops)
Hi,
You need some field comapre in Set analysis
Like If you have Line wise data,
Then you can try like this,
Count({<Line_Id={"=not isNull(Mother_Board)"}>}TotalNoOfLaptops)
Or
In you if statement
Try this,
COUNT(DISTINCT if(not isnull(Mother_Board),TotalNoOfLaptops)).
Regards
HI Manish, looks like it is working fine not able to test it as do not have the data set.
Could please explain me how we are using {'*'}
{'*'} will use only non null value Mother_Board
Thanks manishkachhia tested it it's working fine , just by curiosity i'm asking what if I have to see only the null value instead of non null.
Is there any link you would suggest where I can refer for such kind of queries.
Create a Flag in your script just below Mother_Board Field like below...
If(IsNull(Mother_Board) or Len(Trim(Replace(Mother_Board,'-','')))=0,1,0) as Monther_Board_Null_Flag
Now you can use as below
For Non Null
COUNT({$<Mother_Board = {'*'}>}DISTINCT TotalNoOfLaotops)
or
COUNT({$<Mother_Board_Flag = {0}>}DISTINCT TotalNoOfLaotops)
Try {0} or {'0'} or {"0"} all....
For Null
COUNT({$<Mother_Board_Flag = {'1'}>}DISTINCT TotalNoOfLaotops)