This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Solved! Go to Solution.
Hi @dharish20240911,
Thanks for Kaviraj11 reply.
You can try the following steps
Sample data
Date Value1 Value2
5//1/2024 5 7
6/1/2024 4 8
7/1/2024 7 4
8/1/2024 3 9
9/1/2024 9 5
Create a mesasure
IsCurrentMonth =
IF(
MONTH(SELECTEDVALUE('Table'[Date])) < MONTH(TODAY()),
"Red",
"Black"
)
Apply the measure to the format
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @dharish20240911,
Thanks for Kaviraj11 reply.
You can try the following steps
Sample data
Date Value1 Value2
5//1/2024 5 7
6/1/2024 4 8
7/1/2024 7 4
8/1/2024 3 9
9/1/2024 9 5
Create a mesasure
IsCurrentMonth =
IF(
MONTH(SELECTEDVALUE('Table'[Date])) < MONTH(TODAY()),
"Red",
"Black"
)
Apply the measure to the format
Final output
Best regards,
Albert He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
This above solution is also highting the months for Oct , Nov and December if the current month is Sep
Hi @dharish20240911 ,
I've added a couple of later dates to the original data and still only highlight the first few months, so you can check that all your steps are working.
Best regards,
Albert He
Hi,
Ensure you have a Date table in your model. If not, you can create one using DAX:
DateTable =
ADDCOLUMNS (
CALENDAR (DATE(2020, 1, 1), DATE(2024, 12, 31)),
"Year", YEAR([Date]),
"Month", MONTH([Date]),
"MonthName", FORMAT([Date], "MMMM"),
"MonthYear", FORMAT([Date], "MMM YYYY")
)
Add a calculated column to your Date table to flag past months:
IsPastMonth =
IF (
[Date] < TODAY(),
"Past",
"Current/Future"
)
IsPastMonth column to the Legend or Axis field well to differentiate between past and current/future months.
Here’s an example of how your data might look:
Date | Value | IsPastMonth
-----------|-------|------------
2024-01-01 | 100 | Past
2024-02-01 | 150 | Past
2024-03-01 | 200 | Past
2024-04-01 | 250 | Current/Future
2024-05-01 | 300 | Current/Future
In the chart, the past months (January, February, March) will be highlighted differently from the current/future months (April, May).
This approach ensures that your past months are visually distinct in the Line and Stacked Column chart, making it easier to analyze trends over time.
Proud to be a Super User! | |
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 61 | |
| 35 | |
| 29 | |
| 23 | |
| 22 |