Forum Discussion
Excel to filter some weeks
- 4 years ago
Hi, Anonymous
You can try the following methods.
Sample data:
Table1:
Table2:
Measure:
Measure = VAR N1 = CALCULATE ( MAX ( 'Table 2'[weeks not to consider] ), FILTER ( ALL ( 'Table 2' ), [UPC] = SELECTEDVALUE ( 'Table 1'[UPC] ) && [weeks not to consider] = SELECTEDVALUE ( 'Table 1'[week] ) ) ) RETURN IF ( SELECTEDVALUE ( 'Table 1'[week] ) <> N1, 1, 0 )Your selected week does not appear in the view. Is this the result you expect?
Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I have a messy solution.
I connected my excel to power bi
Added a custom column that joined the UPC and the Week number to both the Excel table and to the table with all the UPC in. this makes a unique key that I could use to merge the tables later.
On the excel table I also added a column called "remove" and just had the word "remove" in all of the rows
I then merged the excel onto my table using the "link" column I had just added
and removed all the rows that now had the word "remove" in them
and I removed the "link" column
Thank you for responding.
Im going to try your solution 😄