The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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 |
---|---|
24 | |
10 | |
8 | |
7 | |
6 |
User | Count |
---|---|
32 | |
12 | |
10 | |
10 | |
9 |