Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I would like to add a column to a table. The table includes a date column. I would like the new column to show TRUE if the date is the MAX in any given month. E.g.
Date | New Column |
03/04/2016 | FALSE |
19/04/2016 | TRUE |
12/04/2016 | FALSE |
06/05/2015 | FALSE |
11/05/2016 | FALSE |
15/05/2016 | TRUE |
Any suggestions as to what formula might produce this?
Thanks!
Solved! Go to Solution.
Oh, just the latest date whether it's the true end of the month or not?
MaxOfMonth = IF( Table1[date] = CALCULATE( MAX(TableName[date]), FILTER( ALL(TableName), MONTH(TableName[date]) = MONTH(EARLIER(TableName[date])) && YEAR(TableName[date]) = YEAR(EARLIER(TableName[date])) ) ), TRUE, FALSE )
Proud to be a Super User!
EndOfMonth = IF(TableName[date] = EOMONTH(TableName[date], 0), TRUE, FALSE)
Proud to be a Super User!
Thanks @KHorseman,
It's not the EOM that I want, it is the MAX date in month; this might be, for example, 22 September, as data is not included for every date in the month.
Oh, just the latest date whether it's the true end of the month or not?
MaxOfMonth = IF( Table1[date] = CALCULATE( MAX(TableName[date]), FILTER( ALL(TableName), MONTH(TableName[date]) = MONTH(EARLIER(TableName[date])) && YEAR(TableName[date]) = YEAR(EARLIER(TableName[date])) ) ), TRUE, FALSE )
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |