Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
I am trying to figure out how to create a table that has the first and last date of current month.
DAX expressions that I have tried:
Current_WholeMonth =
Var Mindate = MIN( TODAY() )
Var Maxdate = MAX( TODAY() )
Return
CALENDAR (Mindate, Maxdate)
But, it states an error that mentions MIN only accepts a column reference.
I was wondering if anyone has a workaround for this. If MIN only accepts a column reference, how should I change the DAX expressions so that it only returns the first and last date of the current month?
Expected output (As of 2nd September 2022):
Solved! Go to Solution.
Hi @Anonymous
please use
Current_WholeMonth =
VAR Maxdate =
EOMONTH ( TODAY (), 0 )
VAR Mindate =
EOMONTH ( TODAY (), -1 ) + 1
RETURN
CALENDAR ( Mindate, Maxdate )
Hi @Anonymous
please use
Current_WholeMonth =
VAR Maxdate =
EOMONTH ( TODAY (), 0 )
VAR Mindate =
EOMONTH ( TODAY (), -1 ) + 1
RETURN
CALENDAR ( Mindate, Maxdate )
Thank you very much! It works like a charm.
Hi,
Please try something like below.
It is for creating a new table.
Current_WholeMonth Table =
VAR _mindate =
EOMONTH ( TODAY (), -1 ) + 1
VAR _maxdate =
EOMONTH ( TODAY (), 0 )
RETURN
CALENDAR ( _mindate, _maxdate )
Thank you very much! Finally, get the table I wanted.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |