Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
thampton
Helper III
Helper III

Latest Day Column

I have a calendar table that generates from oct 1 2019 to current day. 

 

Is there a formula i could write to add a column showing the latest date in each month (0/1 values). For example, column would have a 1 on oct 31, 1 on nov 30, etc. but also have a 1 on feb 14, then tomorrow it would move to feb 15, etc...

 

Thanks

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @thampton ,

 

Try the following calculated column:

 

Column =
SWITCH (
    TRUE ();
    'Calendar'[Date] = EOMONTH ( 'Calendar'[Date]; 0 )
        || 'Calendar'[Date] = TODAY (); 1;
    0
)

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @thampton ,

 

Try the following calculated column:

 

Column =
SWITCH (
    TRUE ();
    'Calendar'[Date] = EOMONTH ( 'Calendar'[Date]; 0 )
        || 'Calendar'[Date] = TODAY (); 1;
    0
)

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



@MFelix  This worked perfectly! Thank you so much.

amitchandak
Super User
Super User

Try Like a new column like

Column =

var _max= maxx(date,date[date])

Return

if(date[date]=eomonth(date[date]) || date[date] =_max,1,0)

 

Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution.
In case it does not help, please provide additional information and mark me with @

Thanks. My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP, HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Connect on Linkedin

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.