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

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.

Reply
BigKev
Helper III
Helper III

Calendar Flag

Hi All,

 

Could anyone please help me to create a flag for my calendar? These are the flag that I need for my data

  • From this month until the Next Three Months
  • This Month Only
  • Next Month Only
  • Next Two Month Only

 

Below are the date structure and the flag format that I need.

DateFrom this month until the Next Three MonthsThis Month OnlyNext Month OnlyNext Two Month Only
8/10/20200000
9/10/20200000
10/10/20200000
11/10/20200000
12/10/20200000
5/11/20201100
6/11/20201100
7/11/20201100
8/11/20201100
9/11/20201100
10/11/20201100
11/11/20201100
12/11/20201100
8/12/20201010
9/12/20201010
10/12/20201010
11/12/20201010
12/12/20201010
8/01/20211001
9/01/20211001
10/01/20211001
11/01/20211001
12/01/20211001
8/02/20210000
9/02/20210000
10/02/20210000
11/02/20210000
12/02/20210000

 

Thanks all.

 

Cheers,

Kev

1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@BigKev 

 

Add the following columns to your table in order:

 

This Month = 
VAR __Month = FORMAT([Date],"yymm") = FORMAT(TODAY(),"yymm") 
return
__Month

Next Month = 

VAR __Month = FORMAT([Date],"yymm") = FORMAT(EDATE(TODAY(),1),"yymm") 
return
__Month

Next 2 Months = 

VAR __Month = FORMAT([Date],"yymm") = FORMAT(EDATE(TODAY(),2),"yymm") 
return
__Month

This month until next three months = 
Dates[This Month] || Dates[Next Month] || Dates[Next 2 Months]

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

2 REPLIES 2
Fowmy
Super User
Super User

@BigKev 

 

Add the following columns to your table in order:

 

This Month = 
VAR __Month = FORMAT([Date],"yymm") = FORMAT(TODAY(),"yymm") 
return
__Month

Next Month = 

VAR __Month = FORMAT([Date],"yymm") = FORMAT(EDATE(TODAY(),1),"yymm") 
return
__Month

Next 2 Months = 

VAR __Month = FORMAT([Date],"yymm") = FORMAT(EDATE(TODAY(),2),"yymm") 
return
__Month

This month until next three months = 
Dates[This Month] || Dates[Next Month] || Dates[Next 2 Months]

________________________

If my answer was helpful, please consider Accept it as the solution to help the other members find it

Click on the Thumbs-Up icon if you like this reply 🙂

YouTube  LinkedIn

 

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

sanalytics
Solution Supplier
Solution Supplier

@BigKev ,

Make a month & year number and create your tag accordingly..

have a look on below screenshot,

sanalytics_0-1604820001249.png

Attached link is power bii file

https://dropfiles.org/J1Gy2zDB

Regards,

sanalytics

If it is your solution please like and Accept it as solution

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.