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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Conditional formatting based on fortnight dates

hi,

Below is my model .My "appointment" table has details like when appointment is scheduled(column schedulestart) while in "activity parties" i have account names for which appointment is scheduled(column Account name).they have 1-many relation based on account id(appointments) and partyid(activity parties)

model.PNG
I  am showing data in a table as below.My requirement is to highlight Account name and start time columns if a meeting is happening for a same account in next 15 days(fortnight).
Capture.PNG

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

Add a calculated column and take advantage of Apply conditional table formatting.

Column =
VAR a = 'Table'[Account]
VAR t = 'Table'[start time]
RETURN
    IF (
        ISEMPTY (
            FILTER (
                'Table',
                'Table'[Account] = a
                    && DATEDIFF ( t, 'Table'[start time], DAY ) > 0
                    && DATEDIFF ( t, 'Table'[start time], DAY ) < 15
            )
        ),
        0,
        1
    )

 

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

hey @v-chuncz-msft thanks for you reply ..It should also return 1 for  date 2/4/2020.. as its within 15 days for same account


Capture.PNG

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.