Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a set of data with the following info:
MEM#, FV_GROUP
123 FV
456 FV
753 NFV
963 FV
456 FV
769 NFV
I like to get a distinct count of the MEM#.
The result, I like to see is
FV has a count of 3
NFV has a count of 2
The expression I have right now is
=count(distinct(MEM#))
How can change the expression so that I can check the FV_GROUP.
Thanks.
Hi,
Is this what you are looking for . PFA
Hi,
Can you please post the code? I only have the desktop version so I cannot view the qvw. Thanks.
hi,
You have written the correct code. Just add it in expression of a chart and add the FV_Group as dimension.
Here is my expresssion
Count(${< FV_GROUP = {‘FV’}>} DISTINCT MEM#)
but I am not getting any result. Just a -
What am i doing wrong.
Thanks.
If you want to calculate this in a chart, you may use the following chart expression:
Count(DISTINCT TOTAL <FV_GROUP> MEM#)
If you want add this as a field in the script, use the following script:
T1:
LOAD *, RowNo() as ID;
LOAD * Inline [
MEM#,FV_GROUP
123,FV
456,FV
753,NFV
963,FV
456,FV
769,NFV
];
T2:
LOAD FV_GROUP, Count(DISTINCT MEM#) as Cnt Resident T1 Group By FV_GROUP;
Left Join (T1) LOAD FV_GROUP, Cnt Resident T2;
DROP Table T2;
hi,
The dollar should be inside the bracket.
count({$<FV_GROUP={'FV'}>} distinct MEM#)
Deepak