Forum Discussion
Ading columns to a table visual based on a slicer
- 1 year ago
RossBateman96 You can create a disconnected Calendar date table using the below DAX and take the MAX of the Date column based on the selection
1. Create a calculated table like below: (Don't establish a relationship between these two tables)
Calendar = CALENDAR(FIRSTDATE(Table[DueDate]),LASTDATE(Table[DueDate])2. Now create a measure to track the Max of the selected date in the slicer
Selected Date = MAX(Calendar[Date])3. Create all the following measures
DaysOverdue = DATEDIFF(MAX(Table[DueDate]),[Selected Date],DAY)NoDue = IF( [DaysOverdue] <= 0 , 0 , SUM('Table'[Amounts]))< 7 = IF( AND([DaysOverdue] >= 0,[DaysOverdue] <= 7), [NoDue],0)8 - 30 = IF( AND([DaysOverdue] >= 8,[DaysOverdue] <= 30), [NoDue],0)30+ = IF( [DaysOverdue] > 30, [NoDue], 0 )Output:
Did I answer your question? If yes, please mark my post as a solution.
Thanks,
Jai
RossBateman96 can you show me the SelectedDate measure?
- RossBateman961 year ago
Helper I
- Jai-Rathinavel1 year ago
Super User
RossBateman96 Can your create a disconnected calculated table as I mentioned above and use that tables 'column in the slicer and SelectedValue measure ?
- RossBateman961 year ago
Helper I
Thank Jai-Rathinavel this works fine now athough the original table didnt have any relationships with another table
I'll continue through your other steps.
- Jai-Rathinavel1 year ago
Super User