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.
Hi,
I have two tables read from data in spreadsheet. The first query has a column of dates (apart from many other columns) and the second query has a single col/row containing AsOf Date. I want to check whether the dates in my first query are in past/or in future compared to AsOf Date.
Table1[XYZdates] -- Table1 has 10 columns and 10 rows. One of the columns contain dates.
Table2[AsOf] -- Table2 is just a query of a single date picked from a spreadsheet.
I'm trying to add another column to Table1 in Power Query that tells me 'Y/N' depending on whether XYZdates is greater than or less than AsOf date.
How best do we achieve this?
Thanks.
Solved! Go to Solution.
Hi @DeveshSeth ,
Please try like this:
= Table.AddColumn(#"Reordered Columns", "Custom", each if [XYZdates] >= Table2[AsOf]{0} then "Y" else "N")
Hi @DeveshSeth ,
Please try like this:
= Table.AddColumn(#"Reordered Columns", "Custom", each if [XYZdates] >= Table2[AsOf]{0} then "Y" else "N")
@DeveshSeth , In dax this will give you max date from table2 to a new column in table 1 =maxx(Table2,Table2[AsOf date])
In M you have List.Max and Table.Max that you can try to use
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 |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |