Forum Discussion
Date Slicer (User Addition + User Removals)
So right now the scenario i am having is this.
| Table 1 | Table 2 | |||||
| ID | Date | ID | Min Date | Max Date | ||
| 000001 | 15/01/2018 | 000001 | 15/01/2018 | 19/01/2018 | ||
| 000001 | 19/01/2018 | 000002 | 08/01/2018 | 22/03/2018 | ||
| 000002 | 22/02/2018 | 000003 | 18/01/2018 | 01/02/2018 | ||
| 000002 | 08/01/2018 | |||||
| 000002 | 11/01/2018 | |||||
| 000002 | 22/03/2018 | |||||
| 000003 | 18/01/2018 | |||||
| 000003 | 22/01/2018 | |||||
| 000003 | 01/02/2018 |
I need a Fomula for Calculated Columns "Min Date" and "Max Date" by looking up table 2 ID to seach the min and max date by looking up to Table 1 ID.
Okay Now i managed something like this.
Where
Add Date = Calculate(MIN('Snap Historical'[Snap Date]),FILTER(ALL('Snap Historical'[C-Number]),'Snap Historical'[C-Number]='Table'[C-Number]))
Removed Date = IF(Calculate(MAX('Snap Historical'[Snap Date]),FILTER(ALL('Snap Historical'[C-Number]),'Snap Historical'[C-Number]='Table'[C-Number]))=MAX('Snap Historical'[Snap Date]),Blank(),Calculate(MAX('Snap Historical'[Snap Date]),FILTER(ALL('Snap Historical'[C-Number]),'Snap Historical'[C-Number]='Table'[C-Number])))
However, now i need assistance to modify the "Add Date" so that the Returned "Add Date" will Always be getting the Minimum Date that is Larger than " Removed Date"
- Bastille928 years agoFrequent Visitor
Add Date = Calculate(MIN('Snap Historical'[Snap Date]),FILTER(ALL('Snap Historical'[C-Number]),'Snap Historical'[C-Number]='Table'[C-Number]),FILTER(ALL('Snap Historical'[Snap Date]),'Snap Historical'[Snap Date]>='Table'[Removed Date]))
Is this right??
Can i be using >= or it needs to be in a specific format like on Excel where its >=&'Table'[Removed Date]
- Bastille928 years agoFrequent Visitor
Bump,
still awiting on a resoponse to see if the formula for hte previous post for the >= works or it has to be >=&
Regards
- Anonymous8 years agoNot applicable
Bastille92,
What are the tables(Snap Historical, Table) do you refer to in your DAX? And what is the expected result based on the new Table 1 and Table 2?
Regards,
Lydia