Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have 2 date slicers.
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 :
But the result , is not that i expected :
I need a dax , so the "1. (B) Receipt Date" moved to above, and only show data based on Report Version from slicer A.
Solved! Go to Solution.
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 )
)
Best Regards
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 )
)
Best Regards
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 )
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]))
hi @Fikri ,
try like:
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |