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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Fikri
Regular Visitor

2 date slicers in Table

I have 2 date slicers.

Fikri_0-1729240037341.png

 

The main table already connected to 2 different 'calendar' tables. So, A and B above is from different calendar table.
I need to create 'detail' table which contain all the information based on first date slicer (A).
Then another column need to be added into the same detail table but it refer based on second date slicer (B) - for comparison


The main data table is called 'Status'
Currently my dax as below :

1. (A) Receipt Date =
CALCULATE (MAX('Status'[RECEIPT DATE]),USERELATIONSHIP('Status'[Report Version],'Calendar'[Report Version]),ALL('Calendar (2)'))

1. (B) Receipt Date =
// CALCULATE (MAX('Status'[RECEIPT DATE]),USERELATIONSHIP('Status'[Report Version],'Calendar (2)'[Report Version]),ALL('Calendar'))



But the result , is not that i expected :

Fikri_1-1729240526800.png
I need a dax , so the "1. (B) Receipt Date" moved to above, and only show data based on Report Version from slicer A.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Fikri ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. (A) Receipt Date = 
VAR _c1reportversion =
    SELECTEDVALUE ( 'Calendar'[Report Version] )
RETURN
    CALCULATE (
        MAX ( 'Status'[RECEIPT DATE] ),
        FILTER ( ALLSELECTED ( 'Status' ), 'Status'[Report Version] = _c1reportversion )
    )
1. (B) Receipt Date = 
VAR _c2reportversion =
    SELECTEDVALUE ( 'Calendar (2)'[Report Version] )
RETURN
    CALCULATE (
        MAX ( 'Status'[RECEIPT DATE] ),
        FILTER ( ALLSELECTED ( 'Status' ), 'Status'[Report Version] = _c2reportversion )
    )

vyiruanmsft_0-1729502750826.png

Best Regards

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Fikri ,

I created a sample pbix file(see the attachment), please check if that is what you want.

1. (A) Receipt Date = 
VAR _c1reportversion =
    SELECTEDVALUE ( 'Calendar'[Report Version] )
RETURN
    CALCULATE (
        MAX ( 'Status'[RECEIPT DATE] ),
        FILTER ( ALLSELECTED ( 'Status' ), 'Status'[Report Version] = _c1reportversion )
    )
1. (B) Receipt Date = 
VAR _c2reportversion =
    SELECTEDVALUE ( 'Calendar (2)'[Report Version] )
RETURN
    CALCULATE (
        MAX ( 'Status'[RECEIPT DATE] ),
        FILTER ( ALLSELECTED ( 'Status' ), 'Status'[Report Version] = _c2reportversion )
    )

vyiruanmsft_0-1729502750826.png

Best Regards

Fikri
Regular Visitor

Hi @FreemanZ ,

It didnt work, now the Report Version ( first column ) are showing all data ,
and the Receipt Date for both A and B, calculated the Max from all report version ( and not based on selected Report Version slicers ) 

Fikri_0-1729243973895.png

 




try like:

1. (A) Receipt Date =

CALCULATE (MAX('Status'[RECEIPT DATE]),USERELATIONSHIP('Status'[Report Version],'Calendar'[Report Version]),ALL('Calendar (2)'), ALL(Status), VALUES('Status'[Report Version]))

FreemanZ
Super User
Super User

hi @Fikri ,

 

try like:

1. (A) Receipt Date =
CALCULATE (MAX('Status'[RECEIPT DATE]),USERELATIONSHIP('Status'[Report Version],'Calendar'[Report Version]),ALL('Calendar (2)'), ALL(Status))

1. (B) Receipt Date =
// CALCULATE (MAX('Status'[RECEIPT DATE]),USERELATIONSHIP('Status'[Report Version],'Calendar (2)'[Report Version]),ALL('Calendar'), ALL(Status))

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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