The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
User | Count |
---|---|
82 | |
81 | |
37 | |
34 | |
32 |
User | Count |
---|---|
96 | |
79 | |
61 | |
51 | |
51 |