Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a table where there is column 'Category' and 'Transaction Date'
I want to filter out some Category like shoes, wallet, tie and transaction date after 1 Jan 2017.
Is there any way to do this from Query?
I know I can do it from Page Filter or Report Filter in the report but I want to do it from Query.
so if Category is wallet and transaction after 1 Jan 2017, I don't want to see it.
But if the category is wallet but transaction before that I want to have it.
Table.SelectRows(#"Filtered 2", each [Category] <> "Shoes" and [PlanCode] <> "Tie" and [TransactionDate]<= #date(2017, 1, 1))
but I know this is not correct.
Thank you for your help.
Solved! Go to Solution.
You were close:
let Source = Table1, #"Filtered Rows" = Table.SelectRows(Source, each not List.Contains({"shoes","wallet","tie"},[Category]) or [Transaction Date] <= #date(2017, 1, 1)) in #"Filtered Rows"
By the way: strange that you want to include 1/1/2017?
You were close:
let Source = Table1, #"Filtered Rows" = Table.SelectRows(Source, each not List.Contains({"shoes","wallet","tie"},[Category]) or [Transaction Date] <= #date(2017, 1, 1)) in #"Filtered Rows"
By the way: strange that you want to include 1/1/2017?
I want to filter data as per below table,
Test | Cost 1 | Cost 2 | Test | Cost 1 | Cost 2 | |
A | 0 | 10 | A | 0 | 10 | |
B | 0 | 0 | C | 10 | 0 | |
C | 10 | 0 | E | 20 | 20 | |
D | 0 | 0 | ||||
E | 20 | 20 |
Input Output
IF Cost1= 0 & Cost2 = 0 then dont populate the row.
Any help will be appreciated
Just a quick question.
Will it filter out date after 1 Jan 2017 for other categories as well?
Because I want to retain the transaction record for other categories.
The reason I want to filter out this 3 categories is because we don't want to track them anymore.
It want to
exclude AND([Category](shoes,wallet,tie),[TransactionDate](>=1Jan2017))
No, it will just filter out if the date is after 1/1/2017 and the category is one of shoes, wallet, tie.
So in the example below only shoes is filtered out; wallet and tie are kept because these are <= 1/1/2017.
The others are kept because they are not one of shoes, wallet, tie.
This is just a hypothetical case.
Thank you so much for your help.
You are really awesome.
Thanks a lot
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |