Forum Discussion
Anonymous
5 years agoNot applicable
DAX conditional Column based on the same column value with multiple rows
Hi all, I'd like to create a DAX column which returns a text value with rules. If Category = "Done", then "Good" If for the same Account value (for example A with multiple rows) Category = "Do...
- 5 years ago
Anonymous
Add the following code as anew column to your table:Defined = IF( ISEMPTY( FILTER( Accounts , Accounts[Account] = EARLIER(Accounts[Account]) && Accounts[Category] = "Done")), "In Progress", "Done" )________________________
If my answer was helpful, please consider Accept it as the solution to help the other members find it
Click on the Thumbs-Up icon if you like this reply 🙂
Ashish_Mathur
5 years agoSuper User
Hi,
This calculated column formula works
=if(AND(CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Account]=EARLIER(Data[Account])&&(Data[Category]="Done"||Data[Category]="Unfinished")))=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Account]=EARLIER(Data[Account]))),CALCULATE(COUNTROWS(Data),FILTER(Data,Data[Account]=EARLIER(Data[Account])&&Data[Category]="Done"))>=1),"Good","In progress")
Hope this helps.