cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Creating a Month To date flag Colum

Hello, 

 

I have a few columns in my table that flag if a date is in current week or previous week, or previous 28 days...I'm wondering if I can create a flag for in current month and same month last year.

 

Here's what I'm using for the last28days flag: 

 

IsLast28Days = if(AND([Date]>=[Today]-28,[Date]<=[Today] ),1,0)
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Re: Creating a Month To date flag Colum

See if this DAX helps with New Columns:

 

Curr_Month_Check = IF(YEAR(Dates[Date]) = YEAR(TODAY()) && MONTH(Dates[Date]) = MONTH(TODAY()), 1, 0)
 
Prior_Year_Month_Check = IF(YEAR(Dates[Date]) = (YEAR(TODAY())-1) && MONTH(Dates[Date]) = MONTH(TODAY()), 1, 0)
 

Capture.PNG

View solution in original post

1 REPLY 1
Highlighted
Solution Sage
Solution Sage

Re: Creating a Month To date flag Colum

See if this DAX helps with New Columns:

 

Curr_Month_Check = IF(YEAR(Dates[Date]) = YEAR(TODAY()) && MONTH(Dates[Date]) = MONTH(TODAY()), 1, 0)
 
Prior_Year_Month_Check = IF(YEAR(Dates[Date]) = (YEAR(TODAY())-1) && MONTH(Dates[Date]) = MONTH(TODAY()), 1, 0)
 

Capture.PNG

View solution in original post

Helpful resources

Announcements
Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors