Forum Discussion
AudreyPowerBI
8 years agoNew Member
If Duplicate Value In Column vs Distinct Occurrence
Good evening Power BI Community! In the Query Editor, I'm trying to create a new custom column to do the following: If the data in Column A only occurs once in that column, then show me what is ...
- 8 years ago
Hello and thank you everyone for your late night help!
It was definitely much appreciated. :D
In case you're wondering, the approach I took that did the trick was as follows:
SOLUTION = IF (CALCULATE (HASONEVALUE(SOLUTION[COLUMNB]),ALLEXCEPT(SOLUTION,SOLUTION[COLUMNA]) )=TRUE,SOLUTION[COLUMND],"Multiple")
Thank you all and I hope you have a lovely weekend!
Audrey
Ashish_Mathur
8 years agoSuper User
Hi,
Try this
=IF(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Heading1]=EARLIER(Data[Heading1])))>1,"Multiple",Data[Heading])
I have assumed that the Table name is Data and heading of column A id Heading1. Also, the data type of entries in the heading column has been assumed as text.