Forum Discussion
Get Column Values ignoring Relationship Mapping using DAX
- Anonymous3 years ago
Hi Anonymous ,
Please try below steps:
1. below is my model
2. create a measure with below dax formula
Measure = VAR _date1 = SELECTEDVALUE ( Calendar1[Date] ) VAR _date2 = SELECTEDVALUE ( Calendar2[Date] ) VAR _date = SELECTEDVALUE ( 'Country'[Date] ) VAR _val = SWITCH ( TRUE (), ISFILTERED ( Calendar1[Date] ) && ISFILTERED ( Calendar2[Date] ), _date2, ISFILTERED ( Calendar1[Date] ) && NOT ( ISFILTERED ( Calendar2[Date] ) ), _date1, ISFILTERED ( Calendar2[Date] ) && NOT ( ISFILTERED ( Calendar1[Date] ) ), _date2, NOT ( ISFILTERED ( Calendar2[Date] ) ) && NOT ( ISFILTERED ( Calendar1[Date] ) ), _date ) RETURN IF ( _date = _val, 1 )3. add two slicer with Calendar1 and Calendar2 table field, add a table visual with Country table fields, add measure into table visual filter then set and apply
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Please try below steps:
1. below is my model
2. create a measure with below dax formula
Measure =
VAR _date1 =
SELECTEDVALUE ( Calendar1[Date] )
VAR _date2 =
SELECTEDVALUE ( Calendar2[Date] )
VAR _date =
SELECTEDVALUE ( 'Country'[Date] )
VAR _val =
SWITCH (
TRUE (),
ISFILTERED ( Calendar1[Date] ) && ISFILTERED ( Calendar2[Date] ), _date2,
ISFILTERED ( Calendar1[Date] ) && NOT ( ISFILTERED ( Calendar2[Date] ) ), _date1,
ISFILTERED ( Calendar2[Date] ) && NOT ( ISFILTERED ( Calendar1[Date] ) ), _date2,
NOT ( ISFILTERED ( Calendar2[Date] ) ) && NOT ( ISFILTERED ( Calendar1[Date] ) ), _date
)
RETURN
IF ( _date = _val, 1 )
3. add two slicer with Calendar1 and Calendar2 table field, add a table visual with Country table fields, add measure into table visual filter then set and apply
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.