Forum Discussion
MasterSonic
3 years agoHelper IV
Count if Filter help
Hi guys, the help I need is based on following logic: I want to find all Test, where value is OK for Task and they have same Code. As you see In the table Code is repetitve(result of unpivoting)...
- 3 years ago
Hi MasterSonic
Thanks for reaching out to us.
please try this
sample data
isduplicate = var _count=COUNTROWS('Table') return if(_count>1,MIN('Table'[Code]))Measure = var _t= FILTER('Table',[isduplicate]<>BLANK()) return COUNTX(DISTINCT(_t),[Code])result
Best Regards,
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
MasterSonic
3 years agoHelper IV
Hi,
sorry I did not mentioned that there are few more columns in this table with veriaty of values
I think COUNTROWS ( DISTINCT ( TableName ) ) will not do the job.
Can COUNTROWS ( DISTINCT ( TableName ) ) be specificed just to these 4 columns i mentioned in my 1st post.?
tamerj1
3 years agoCommunity Champion
yes of course. You select the required columns
COUNTROWS ( DISTINCT ( SELECTCOLUMNS ( TableName, "@Code", [Code], "@Teast", [Test], "@Value", [Value] ) ) )