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 am trying to figure out how to create a column that looks at a date (column "Due date" - see below) and returns a value of "True" if it's past today's date or "False" if it's not. What is the correct way to do this? I'm able to do it in Excel using +IF statement, but can't figure out how to replicate that in Power BI. I am currently using an app that is pulling data from Planner and dumping it into an Excel file. I cannot update the Excel source file the data is being pulled from since it is being overwritten every hour. Any help is greatly appreciated. Thanks!
Solved! Go to Solution.
Hi again,
There are several options how to achieve it. Maybe not the best, but definitelly very easy is to:
1. Create a new custom column "Today"
2. Function for custom column should look like this:
3. Change the data type from Date-Time to only Date
4. Follow the same logic as I mentioned before, only now you will use for the comparison this dynamic column instead of a date:
Hi,
you can also create a conditional column with IF. The easiest way is:
1. Go to Add a new column.
2. Add conditional column.
3. Choose which columns to use for evaluation and what should be the condition and results.
Similar in following picture:
All of that worked fine up until I went to save the conditional column. It's forcing me to pick a DateTime value.
I went back, changed the "Today" column to have the full date and time, then created the Conditional Column and it worked. I was able to change the "Today" column after the condition was set to be date only.
Thank you so much for your help!
Interesting behavior, it did not "force" me to have there Date-time value.
Anyway glad to help and please mark this as a solution so others might find it, when they need it.
Hi Migasuke,
Thank you for your quick reply. I tried this and it does work as long as designed. I would like the date value to be a dynamic value (ie - whatever today's date may be at any given time). Is it possible to have a formula or something similar in that field so it knows to use today's date rather than just June 30, 2021?
Hi again,
There are several options how to achieve it. Maybe not the best, but definitelly very easy is to:
1. Create a new custom column "Today"
2. Function for custom column should look like this:
3. Change the data type from Date-Time to only Date
4. Follow the same logic as I mentioned before, only now you will use for the comparison this dynamic column instead of a date:
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 |
---|---|
110 | |
99 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
110 | |
91 | |
84 | |
66 |