Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have this data:
Col1 | Col2 | Col3 | Col4 |
A | 01/01/2021 01:30 | 01/01/2021 | 1 |
A | 01/01/2021 02:30 | 01/01/2021 | 1 |
A | 01/01/2021 03:30 | 01/01/2021 | 1 |
B | 01/01/2021 01:30 | 01/01/2021 | 2 |
B | 01/01/2021 02:30 | 01/01/2021 | 2 |
B | 01/01/2021 03:30 | 01/01/2021 | 2 |
I create a time graph using Col2 but I want to use in a Measure the Col4 where the date of Col2 = Col3. The think is that if I do that, it returns a whole column of three values from Col4 so I either need the max/avg of them or only the first value.
Any idea how to do that?
Thanks!
Solved! Go to Solution.
Hi @Anonymous ,
About matching datetimes with dates, you can do the following.
Column = IF(DATE(YEAR([Col2]),MONTH([Col2]),DAY([Col2]))=[Col3],"Y","N")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
About matching datetimes with dates, you can do the following.
Column = IF(DATE(YEAR([Col2]),MONTH([Col2]),DAY([Col2]))=[Col3],"Y","N")
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous Yes, it must aggregate somehow so not sure exactly what your requirement is? Can you describe or draw your desired result further?
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
75 | |
72 | |
39 | |
29 | |
27 |
User | Count |
---|---|
97 | |
96 | |
58 | |
44 | |
40 |