Forum Discussion
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.
| Date | From this month until the Next Three Months | This Month Only | Next Month Only | Next Two Month Only |
| 8/10/2020 | 0 | 0 | 0 | 0 |
| 9/10/2020 | 0 | 0 | 0 | 0 |
| 10/10/2020 | 0 | 0 | 0 | 0 |
| 11/10/2020 | 0 | 0 | 0 | 0 |
| 12/10/2020 | 0 | 0 | 0 | 0 |
| 5/11/2020 | 1 | 1 | 0 | 0 |
| 6/11/2020 | 1 | 1 | 0 | 0 |
| 7/11/2020 | 1 | 1 | 0 | 0 |
| 8/11/2020 | 1 | 1 | 0 | 0 |
| 9/11/2020 | 1 | 1 | 0 | 0 |
| 10/11/2020 | 1 | 1 | 0 | 0 |
| 11/11/2020 | 1 | 1 | 0 | 0 |
| 12/11/2020 | 1 | 1 | 0 | 0 |
| 8/12/2020 | 1 | 0 | 1 | 0 |
| 9/12/2020 | 1 | 0 | 1 | 0 |
| 10/12/2020 | 1 | 0 | 1 | 0 |
| 11/12/2020 | 1 | 0 | 1 | 0 |
| 12/12/2020 | 1 | 0 | 1 | 0 |
| 8/01/2021 | 1 | 0 | 0 | 1 |
| 9/01/2021 | 1 | 0 | 0 | 1 |
| 10/01/2021 | 1 | 0 | 0 | 1 |
| 11/01/2021 | 1 | 0 | 0 | 1 |
| 12/01/2021 | 1 | 0 | 0 | 1 |
| 8/02/2021 | 0 | 0 | 0 | 0 |
| 9/02/2021 | 0 | 0 | 0 | 0 |
| 10/02/2021 | 0 | 0 | 0 | 0 |
| 11/02/2021 | 0 | 0 | 0 | 0 |
| 12/02/2021 | 0 | 0 | 0 | 0 |
Thanks all.
Cheers,
Kev
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 🙂
2 Replies
- sanalyticsSuper User
BigKev ,
Make a month & year number and create your tag accordingly..
have a look on below screenshot,
Attached link is power bii file
https://dropfiles.org/J1Gy2zDB
Regards,
sanalytics
If it is your solution please like and Accept it as solution
- FowmySuper User
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 🙂