cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
yogeshk77
Helper I
Helper I

Monday before 3rd Saturday in Calendar

I have a Calendar Table created in DAX
I have Calculated Column that says "True" for the date if it's the 3rd Saturday in that month, False otherwise

 

yogeshk77_0-1676038367009.png

 

Now, I need another column called "Is My Monday" that should have "True" if that date is the Monday before the Third Saturday, "False" otherwise like this ->

yogeshk77_1-1676038536800.png

 

How do I write a DAX expression for such a calculated column?

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

I think you can create a column like

Is My Monday =
IF (
    WEEKDAY ( 'Date'[Date], 2 ) = 1,
    VAR CurrentDate = 'Date'[Date]
    VAR IsThirdSat =
        LOOKUPVALUE ( 'Date'[Is Third Saturday], 'Date'[Date], CurrentDate + 5 )
    RETURN
        IF ( IsThirdSat, 1, 0 ),
    0
)

View solution in original post

1 REPLY 1
johnt75
Super User
Super User

I think you can create a column like

Is My Monday =
IF (
    WEEKDAY ( 'Date'[Date], 2 ) = 1,
    VAR CurrentDate = 'Date'[Date]
    VAR IsThirdSat =
        LOOKUPVALUE ( 'Date'[Is Third Saturday], 'Date'[Date], CurrentDate + 5 )
    RETURN
        IF ( IsThirdSat, 1, 0 ),
    0
)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors