Forum Discussion
Calculated Table
- 6 years ago
Hi,
According to your further description, i create a seperate date slicer table:
Then try this measure:
Measure = IF(MAXX(ALL('Table 1'),'Table 1'[date])<>SELECTEDVALUE('Date Slicer'[Date]),IF(MAX('Table 1'[date])=MAX('Table 2'[Date]),1,0),IF(MAX('Table 1'[date])=SELECTEDVALUE('Date Slicer'[Date]),1,0))Apply this measure to the table1, when you choose the max date in table1, it shows the max date's data:
When you choose other date which is not equal to the max date in table1, it shows the data with table1[date]=table2[date]:
Here is my test pbix file:
Expect your reply!
Best Regards,
Giotto Zhi
Zhi, Thank you for your feedback so far.
There is a small change .I should have been more specific from the begining.
We are taking the MAX of date from Table 1 but what if we have a pick a date that is not the MAX but is equal to the date from the Table 2.
Table 1 -
| country | rate | date |
| MX | .5 | 03/10/2020 |
| MX | .8 | 03/11/2020 |
| US | .7 | 03/10/2020 |
| US | .9 | 03/11/2020 |
| MX | .8 | 03/20/2020 |
| US | .7 | 03/20/2020 |
Table 2
| Date |
| 03/11/2020 |
Result Table -
| country | rate | date |
| US | .9 | 03/11/2020 |
| MX | .8 | 03/11/2020 |
Hi,
According to your further description, i create a seperate date slicer table:
Then try this measure:
Measure = IF(MAXX(ALL('Table 1'),'Table 1'[date])<>SELECTEDVALUE('Date Slicer'[Date]),IF(MAX('Table 1'[date])=MAX('Table 2'[Date]),1,0),IF(MAX('Table 1'[date])=SELECTEDVALUE('Date Slicer'[Date]),1,0))Apply this measure to the table1, when you choose the max date in table1, it shows the max date's data:
When you choose other date which is not equal to the max date in table1, it shows the data with table1[date]=table2[date]:
Here is my test pbix file:
Expect your reply!
Best Regards,
Giotto Zhi
- Anonymous6 years agoNot applicable
Thank you!