Hi Guys
I just don't know how to get the expression correctly. How do I count unique value in week 4 ? I create this expression but don't know where is my mistake. It call 20 instead of the correct answer 14.
COUNT(SELECT(NC DOC[PROCESS/PROJECT OWNERSHIP],AND(TRUE,TRUE,[_THISROW].[WW]=[WW])))
Solved! Go to Solution.
Suvrutt
Thnak you again for responding to me. I put a count because the result is a number and TRUE,TURE is do remove duplicate. I try your expression there is an error but I put a count to count the list the answe is correct i.e. 14 See row 5 work week 4
Yes, sorry there was a typo in my suggestion. UNIQUE() will produce a list of no duplicate items. You then need to use COUNT() on the list of UNIQUE() items.
I have corrected it in the original post also to avoid any confusion by future readers of the post thread.
I believe you can simply try
COUNT(UNIQUE(SELECT(NC DOC[PROCESS/PROJECT OWNERSHIP],[_THISROW].[WW]=[WW])))
Please use UNIQUE() instead of before COUNT()
COUNT(UNIQUE(SELECT(NC DOC[PROCESS/PROJECT OWNERSHIP],AND(TRUE,TRUE,[_THISROW].[WW]=[WW]))))
In general such expressions if used in VC etc. can be very sync time expensive. If you are trying to count for a specific week at a time, please try using a slice to filter records for that week and then running UNIQUE() on those filtered records.
Edit: Made changes in above suggestion as there was an inadvertent error in suggestion.
Suvrutt
Thnak you again for responding to me. I put a count because the result is a number and TRUE,TURE is do remove duplicate. I try your expression there is an error but I put a count to count the list the answe is correct i.e. 14 See row 5 work week 4
Yes, sorry there was a typo in my suggestion. UNIQUE() will produce a list of no duplicate items. You then need to use COUNT() on the list of UNIQUE() items.
I have corrected it in the original post also to avoid any confusion by future readers of the post thread.
I believe you can simply try
COUNT(UNIQUE(SELECT(NC DOC[PROCESS/PROJECT OWNERSHIP],[_THISROW].[WW]=[WW])))
Thank you very much
User | Count |
---|---|
15 | |
11 | |
10 | |
8 | |
3 |