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 All,
I have a table
Date 1 Date2
1/2/2019 1/1/2019
2/2/2019 1/1/2019
3/2/2019 1/1/2019
4/2/2019 1/1/2019
5/2/2019 1/1/2019
1/2/2019 1/2/2019
2/2/2019 1/2/2019
3/2/2019 1/2/2019
4/2/2019 1/2/2019
5/2/2019 1/2/2019
6/2/2019 1/2/2019
I want to add a column which will show a Y for the next 5 days from max(date2).I am using direct query connection.
My result table should look like
Date 1 Date2 NewCOLUMN
1/2/2019 1/1/2019 N
2/2/2019 1/1/2019 N
3/2/2019 1/1/2019 N
4/2/2019 1/1/2019 N
5/2/2019 1/1/2019 N
1/2/2019 1/2/2019 Y
2/2/2019 1/2/2019 Y
3/2/2019 1/2/2019 Y
4/2/2019 1/2/2019 Y
5/2/2019 1/2/2019 Y
6/2/2019 1/2/2019 N
kindly Help
Solved! Go to Solution.
Hi @Suryaann ,
Have you solved the problem?
If you have solved the problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hi @Suryaann ,
Have you solved the problem?
If you have solved the problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
What is the criteria by which you are giving NewCOLUMN a "Y" or "N"? The only partial pattern I could see was if Date2 was after 1/1/2019, NewCOLUMN had a "Y" (albeit the last row is a "N"). If this is the case, you could make a calculated column like so (I know the last row is wrong, I just don't know your criteria yet):
If the criteria involves the difference between Date1 and Date2, you could use the DATEDIFF function: https://docs.microsoft.com/en-us/dax/datediff-function-dax
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 |
---|---|
114 | |
100 | |
81 | |
70 | |
62 |
User | Count |
---|---|
148 | |
116 | |
104 | |
90 | |
65 |