Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello guys, please help me in understanding below qlik logic
count
(
DISTINCT
{
<
[Im Date]={">=$(=QuarterStart(max([Im Date]))) <=$(=date(max( [Im Date])))"},
FyQtr=,
Quarter=,
Year=,
[Type]={"Northern"},
[Category]={'INELIGIBLE'},
[En Number]=E({<[HM Flag]={'Y'},FyQtr=,Quarter=,Year=>}[En Number])
>
}
[En Number])
Thanks in advance
Hi,
The base expression is Count(distinct [En number]). Then this expression is altered by a Set Analysis.
Set analysis is contained between {<>}.
Let start with the simplest ones:
Year=, means that the calculation will use all the year available in the app, and not the selected one.
[Type]={"Northern"}, means that the calculation will be on the "Northern" Type only
[Im Date]={">=$(=QuarterStart(max([Im Date]))) <=$(=date(max( [Im Date])))"}, this one is quite complex.
The Im Date is between the start of the quarter of the Max of Im Date, and the Max of Im Date, depending of the selections.
[En Number]=E({<[HM Flag]={'Y'},FyQtr=,Quarter=,Year=>}[En Number]) is the more complex one because it's use the E() function.
E() will exclude value. In this case E will exclude En Number values that match the Set Analysis {<[HM Flag]={'Y'},FyQtr=,Quarter=,Year=>}
Is this more clear for you ?
Regards
Thanks for replying
so in my last filtering set expression E() is used, so HM Flag with Y will not be taken and other than that will be taken
same for FyQtr and Year with blank values are not taken??
What if p() is there
then only HM Flag with Y, FyQtr and Year with blanks will be considered??
Great explanation by Maximepiquetcointe. I would add that it may be helpful to put the expression into a text box a piece at a time and then you can see the effects of the different parts. Start with the basic Count(distinct [En number]) and then add in different parts of the set analysis one at a time and this may help you to understand what is happening.
Kindest regards
Brian
Yes it would be helpful, please
Thanks!
Thnaks for replying
So if E() is used then the HM Parts flag with Y will be excluded? and result will be there other than 'Y'
and FyQtr and Year with blanks will be excluded and filtered for other than blanks?
what if in case of p(), 'Y' will be taken for HM Parts flag and blank for year and FyQtr will be taken?
please reply back
Hi
Thanks for replying
In my script FyQtr=,
Year=,
Is there
Does this means blank or any other condition in qlik?
Hi,
You're right, E() excludes the value, and P() the possible ones.
yQtr=,Year=, means Qlik will take all the values for yQtr and Year, not only the selected ones.
Is this more clear now ?
Regards
Hey
That was great explanation
So according to my logic
First they are taking FyQtr=
And also including FyQtr= in E() so no need to take this into consideration right I mean this filter??
And can you give any example for p() if possible....that would be so helpful for me
Thanks again!!!