The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi all,
Very new to power BI but trying to wrap my head around this one ...
I'm trying to get the latest date registered across different columns for each row separately.
Each line corresponds to an item that has several stages of completion but what I'm trying to get is the last date on which any of those stage was completed.
I'm not sure how to write the formula for that ... in excel, I would use something like =MAX(B2:I2) but it doesn't seem to work and I have some columns in the middle with non-date related content so that might be playing up in my issue ...
Thanks in advance !
Solved! Go to Solution.
Power Bi is better at dealing with Columns rather than rows so you could Unpivot the date columns in Power Query and write a simple MAX measure or
Add a column in Power Query using List.Max() . You would pass it a list of the column names.
-
If you want to keep the data in the original format and get a DAX solution, you would have to compare the values of each column with a lengthy series of comparisons. Not ideal but I have seen code on the forum to do it.
I ended up going with the lengthy comparison as I couldn't work out how to have the calculation based on the transposed data to change column for each following row if that makes sense ?
Power Bi is better at dealing with Columns rather than rows so you could Unpivot the date columns in Power Query and write a simple MAX measure or
Add a column in Power Query using List.Max() . You would pass it a list of the column names.
-
If you want to keep the data in the original format and get a DAX solution, you would have to compare the values of each column with a lengthy series of comparisons. Not ideal but I have seen code on the forum to do it.
User | Count |
---|---|
68 | |
63 | |
59 | |
54 | |
28 |
User | Count |
---|---|
183 | |
80 | |
62 | |
46 | |
38 |