Forum Discussion
bbotros77
3 years agoFrequent Visitor
Power BI MIN Date Between Two Dates
I was trying to get the Min date between two dates Columns, it works fine only if the two dates are available... if only one date is available, it comes up blank (it is supposed to pick the one date)...
- 3 years ago
Hi bbotros77
Yes, when MIN is used with two scalar arguments, BLANK can be returned if one argument is blank and the other argument is "greater than" BLANK (which is the case for values corresponding to positive numbers).
This is different from how blanks are treated with MIN (with a single column reference argument) or MINX.
You could rewrite your expression by constructing a single-column table containing the two scalar values and use MINX like this, which would return BLANK only if both dates are blank:
Date First Entered ATI or MCA = MINX ( { 'Application'[Date First Entered ATI], 'Application'[Date First Entered MCA] }, [Value] )I think you can omit the .[Date] as well.
Does this work?
bbotros77
3 years agoFrequent Visitor
Hi Owen , I will try to figure out how to create that Single column table and try your advice ( I am still learning Power BI) . Will kep you posted if it works
Thanks
Bassem