Forum Discussion
How to use a selected date value to filter a data table?
- 6 years ago
My question was more about the axis and it is what I feared that you have a date component as the chart axis. The only way I know of to get that to work is to combine a measure like I wrote with a secondary date table. In this example I have created a copy of the date table with this code.
Dates2 = 'Date'The slicer is from the primary date table. The Month column in the chart and grid are from the second date table and you can see that the [Last 6 months] measure returns correctly. Having the secondary date table allows the [month] column in the visual to not be filtered buy the section made on the main date table. Then the measure handles only returning data for those 6 months and it aligns correctly.
You need to join the secondary date table into your model the same way the primary date table is joined in.
jdbuchanan71 Yes it is. I am guessing that the problem may be in the relationships. All the relationships have both direction effect. I am checking if i can change this (its a project that i just got involved, didn't know the details).
EDIT: Changed it but yet not working. Trying to figure out any other reasons.
Not sure it will help but here is the layout of my sample with the extra date table highlighted.
- tfraletti6 years ago
Helper I
jdbuchanan71 Just created a test dataset just to test your solution and it works perfectly. Probably there is something on else on that project dataset that is making it impossible. Thank you very very much!