Forum Discussion
Help_me
5 months agoFrequent Visitor
How to write this IF statement for same date, but different statuses?
Hello, I have the two columns below in the same table. "Cookie Type" is text field and "Baked_Date" is a date value. How can I write the IF statement in DAX for the concept: If the same baked_date ...
- 5 months ago
Calculated column:
Eat Flag =
VAR CurrentDate = 'Table'[Baked_Date]
RETURN
IF(
CALCULATE(
COUNTROWS('Table'),
'Table'[Baked_Date] = CurrentDate,
'Table'[Cookie Type] IN {"Chewy", "Chunky"}
) = 2,
"Eat",
"Do not eat"
)Checks if both Chewy + Chunky exist on same Baked_Date.
FBergamaschi
5 months agoSuper User
Hi Help_me
please provide more sample rows and clarify what lbendlin asked: do you need to create a column in the table or a measure for a visual?
If this helped, please consider giving kudos and mark as a solution
@me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI