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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Date Table - Use Relationship - Weekday, Weeknum etc.

Hello,

 

i have a fact table with two date columns (Start Date and End Date). I also have a date table with dates, years, months, weekdays etc. Now i want to create a table visual with the two date columns which should also show the weekdays. When I drag the weekday column from the date table in the table visual it shows the weekdays from Start Date because thats the active relationship between the two tables. But i also want to have the weekdays from End Date. How can I do that? I tried something with use relationship but it doesnt work:

 
Calculate(Max(Date_Table[Weekday]), USERELATIONSHIP(Date_Table[Date],Fact_Table[Date End]))

 

Can somebody please help me?

Mormonen_Chief_0-1652982074473.png

Mormonen_Chief_1-1652982094427.png

 

1 ACCEPTED SOLUTION
sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Anonymous,

 

you could try to write your measure like this:

MEASURE endWEEKDAY =
    VAR _enddate =
        CALCULATE ( SELECTEDVALUE ( sales[enddate] ) )
    RETURN
        CALCULATE (
            MAX ( Dates[weekday name] ),
            FILTER ( ALL ( Dates ), Dates[Date] = _enddate )
        )

 

cheers,

Sturla

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Thank you very much @sturlaws , that works!

sturlaws
Resident Rockstar
Resident Rockstar

Hi, @Anonymous,

 

you could try to write your measure like this:

MEASURE endWEEKDAY =
    VAR _enddate =
        CALCULATE ( SELECTEDVALUE ( sales[enddate] ) )
    RETURN
        CALCULATE (
            MAX ( Dates[weekday name] ),
            FILTER ( ALL ( Dates ), Dates[Date] = _enddate )
        )

 

cheers,

Sturla

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors