Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Community,
Good day. I would like to seek help on how I can filter a specific date upto latest date by Country? I have these columns: Country and Date Originated. I need to filter for example, if Country is Australia I need to filter from Oct 1 onwards, then if Country is India, Korea, SG, Vietnam, March 1 onwards, then if other countries June 1 onwards.
I have looked for possible answers but can't find it. TIA!
Solved! Go to Solution.
Hi @Anonymous ,
You syntax is not quite exact you need to add a formula similar to this:
= Table.SelectRows(#"Changed Type", each if [Country] = "Australia" then [Date Originated] >= #date(2021,10,1) else if List.Contains( {"Korea", "India", "Singapore" , "Vietanm" } , [Country]) then [Date Originated] >= #date(2022,3,1) else ([Date Originated] >= #date(2022,6,1)))
Has ytou can see from the bottom table you want to get the values in green:
When we apply the formula above you get the result you need:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous ,
You syntax is not quite exact you need to add a formula similar to this:
= Table.SelectRows(#"Changed Type", each if [Country] = "Australia" then [Date Originated] >= #date(2021,10,1) else if List.Contains( {"Korea", "India", "Singapore" , "Vietanm" } , [Country]) then [Date Originated] >= #date(2022,3,1) else ([Date Originated] >= #date(2022,6,1)))
Has ytou can see from the bottom table you want to get the values in green:
When we apply the formula above you get the result you need:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsUser | Count |
---|---|
141 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
123 | |
101 | |
71 | |
61 |