Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
i would like to count the number of days if two conditions are met in the power query.. There must be an easy way to do this right?
(if column A and B = Actual then count days between Column B & D)
| Column A | Column B | Column C | Column D |
| Actual | 2022-01-01 | Actual | 2022-03-31 |
BR Patrik - new to power bi
Solved! Go to Solution.
Hi @Anonymous ,
How about this:
You can add a custom column with the following code:
if [Column A] = "Actual" and [Column C] = "Actual" then Duration.Days ( [Column D] - [Column B] ) else null
Let me know if this solves your issue 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Hi @Anonymous ,
How about this:
You can add a custom column with the following code:
if [Column A] = "Actual" and [Column C] = "Actual" then Duration.Days ( [Column D] - [Column B] ) else null
Let me know if this solves your issue 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 8 | |
| 7 | |
| 7 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 19 | |
| 14 | |
| 12 | |
| 12 | |
| 9 |