Forum Discussion
Topjacket
3 years agoHelper I
Check if customer reference contains full data.
Hi I am hoping this will be easy but I can't get it to work. I am trying to add a column (so I can filter certain records from output) which counts the distinct number of "Month & Year" in the en...
- 3 years ago
Topjacket , Sorry my bad, used , inplace of =
if(distinctcount(Table[Month Year])= calculate(distinctcount(Table[Month Year]),filter(Table, Table[Customer]= earlier(Table[Customer]))) , "Yes", "No")
v-yueyunzh-msft
3 years agoCommunity Support
Hi , Topjacket
Here are the steps you can refer to :
(1)This is my test data :
(2)We can create a caluclated column :
Flag = var _total_count = COUNTROWS( ALL('Table6'[Month & Year]))
var _current_ID = 'Table6'[Customer ID]
var _ID_count = COUNTROWS(DISTINCT( SELECTCOLUMNS( FILTER( 'Table6' , 'Table6'[Customer ID] = _current_ID ) ,"month_year" , [Month & Year] )))
return
IF(_total_count = _ID_count , TRUE() , FALSE())
(3)Then we can meet your need , the result is as follows:
If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly