Forum Discussion
TJK
2 years agoHelper I
Group By Calculated Column
How would I create the "Is Loyal v2" column in the Table View using DAX based on the first two columns? I want the outcome to equal "No" for all rows if there is a row that equals "No" for the ID in ...
- 2 years ago
As a calculated column...
Is Loyal v2 = CALCULATE( MIN([Is Loyal]), ALLEXCEPT(loyalTable, loyalTable[ID]) )
ahadkarimi
2 years agoSolution Specialist
Hi TJK, go to Modeling ->New column
Is Loyal v2 =
IF(
CALCULATE(
COUNTROWS('Table'),
'Table'[ID] = EARLIER('Table'[ID]),
'Table'[Is Loyal] = "No"
) > 0,
"No",
"Yes"
)
Did I answer your question? If so, please mark my post as the solution!✔️
Your Kudos are much appreciated! Proud to be a Responsive Resident!
- TJK2 years agoHelper I
Hi ahadkarimi ,
You're formula is giving me the same result as the "Is Loyal" column. It's only showing "No" when "Is Loyal" is equal to "No". I would like it to show "No" for all rows for the given ID.
- jgeddes2 years agoSuper User
As a calculated column...
Is Loyal v2 = CALCULATE( MIN([Is Loyal]), ALLEXCEPT(loyalTable, loyalTable[ID]) ) - ahadkarimi2 years agoSolution Specialist
Is Loyal v2 = IF( CALCULATE( COUNTROWS('Table'), 'Table'[ID] = EARLIER('Table'[ID]), 'Table'[Is Loyal] = "No" ) > 0, "No", "Yes" )