Forum Discussion
Filtering out data based on conditions from different tables
I'm trying to filter out certain products based on how long ago they were added to the data, so that they don't become visible until after x amount of days (they would be in the data read in from start, but would only show up when 14 days have passed) - and can't figure out how to do that..
I have a dimCalendar which contains a DateOffset (from today) - the idea is that I could fetch a value from here like "<-13" if I only want to display items that are 14 days older or more.
And then I have my main data where I have productName and I want to exclude all that CONTAINS the word "table", for example.
How do I write a column that will return a 1 or 0 based on these two conditions combined (and the rest of the products will remain unaffected regardless of how many days ago they were added)?
(the idea is then to use the 0 from that column to only pass through data that did not generate a 1)
1 Reply
- vanessafvgCommunity Champion
its always better to provide sample data if you want your question to be answered quicker.
there are several ways to do this, when creating a calculated column my suggestion is always to push this into the power query layer and not do it in dax, however i am unclear about where your date table is created.
if you provide some sample date in text form with an explanation of where your date table is created then that should be enough to demonstrate.
also provide an example of what your expected result is against thee data, there are lots of nuances in data modelling so the more information you provide the better the solution will be that is provided.