Forum Discussion
Create a Calendar Year Visual
- 11 months ago
Try the approach in the attached pbix.
- Create a calendar table in DAX with columns for date, weekday, week number, and a TRUE/FALSE flag.
- Use a matrix visual: rows = week number, columns = weekday name, values = day number.
- Apply conditional formatting to color days based on the TRUE/FALSE flag.
This gives you a full-year calendar view with dynamic coloring.
Create a Calendar Table
Calendar =
ADDCOLUMNS (
CALENDAR (DATE(2025,1,1), DATE(2025,12,31)),
"Year", YEAR([Date]),
"Month", FORMAT([Date], "MMMM"),
"MonthNum", MONTH([Date]),
"Day", DAY([Date]),
"Weekday", WEEKDAY([Date], 2), -- 2 = Monday start
"WeekdayName", FORMAT([Date], "DDD"),
"WeekNum", WEEKNUM([Date], 2),
"IsFlagged", [YourLogicHere] -- Replace with your TRUE/FALSE logic
)
Build the Matrix Visual
Use a matrix to simulate the calendar grid:
- Rows: WeekNum
- Columns: WeekdayName
- Values: Use a measure like this:
DayLabel =
IF (
SELECTEDVALUE('Calendar'[IsFlagged]),
FORMAT(SELECTEDVALUE('Calendar'[Day]), "00"),
BLANK()
)
Conditional Formatting
Apply color rules to highlight flagged days:
- Go to the matrix visual → Format → Conditional Formatting → Background color.
- Use a measure like:
DayColor =
SWITCH (
TRUE(),
SELECTEDVALUE('Calendar'[IsFlagged]) = TRUE(), "#FF9999", // Red for flagged
"#FFFFFF" // White for normal
)
- danextian11 months agoSuper User
So how is OP exactly going to comparmentalize each month? Care to share a sample pbix?