Forum Discussion
Anonymous
7 years agoNot applicable
Need help on a calculate column
Hi, I'm making a dax command to create a flag in a message like "present / no present" so to do that I use data in column A and B, the two columns come from the same table named: table 1, in column...
- 7 years ago
So probably something like:
Column = VAR __table = FILTER(ALL('Table'),[Column A] = EARLIER([Column A])) VAR __controls = FILTER(__table,[Column B] = "Control") VAR __count = COUNTROWS(__controls) RETURN IF(__count>1,"Present","No Present")
Greg_Deckler
Community Champion
7 years agoSo probably something like:
Column =
VAR __table = FILTER(ALL('Table'),[Column A] = EARLIER([Column A]))
VAR __controls = FILTER(__table,[Column B] = "Control")
VAR __count = COUNTROWS(__controls)
RETURN
IF(__count>1,"Present","No Present")
GilbertQ
Super User
7 years agoGreg has got a great solution, you could also do it in Power Query?