Forum Discussion
Anonymous
3 years agoNot applicable
New column with count conditional for customer ID
Hi, I have a table with columns Customer_ID Store_Brand Order count Date The Store_Brand has different store brands I want to have a column that counts for each Customer_ID row the distinct ...
- 3 years ago
Hi Anonymous ,
Please try:
Distinct_Store_Brand_Count = CALCULATE(DISTINCTCOUNT('Table'[Store_Brand]),FILTER('Table',[Customer_ID]=EARLIER('Table'[Customer_ID])))Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
3 years agoHi,
Drag Customer_ID to the Table and write this measure
Store brand count = distinctcount(Data[Store_Brand])
Hope this helps.
Anonymous
3 years agoNot applicable
Hi,
Thanks for reply, but would need this in the 'data view' and not the reporting.
I understand and expect if the same customer_id, that the count of distinct_store_brand_count will repeat, and that would be the expected behavior... but currently I am getting in 'data view' for this calculated column the same number for each row, which is incorrect.