Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Guys, I need your help to create a calculated column (##First Real Lead Time) to return (##Real Lead Time) based on first date and the type of (##WO+LN), like this:
Date | ##WO+LN | ##Real Lead Time | ##First Real Lead Time |
9/5/2022 | 1234.1 | 22 | 211 |
8/29/2022 | 1234.1 | 22 | 211 |
8/22/2022 | 1234.1 | 22 | 211 |
8/15/2022 | 1234.1 | 29 | 211 |
8/8/2022 | 1234.1 | 211 | 211 |
9/5/2022 | 1234.2 | 22 | 119 |
8/29/2022 | 1234.2 | 22 | 119 |
8/22/2022 | 1234.2 | 22 | 119 |
8/15/2022 | 1234.2 | 29 | 119 |
8/8/2022 | 1234.2 | 119 | 119 |
Many tks,
Alexandre
Solved! Go to Solution.
oh no!!!
Anyway, I have find a solution.
I follow this aproach: https://stackoverflow.com/questions/73722277/find-the-first-value-by-category-dax
First, I created a Index column on Power Query.
After that, I created a calculated column with Group Rank:
and finally, I added another calculated column:
Now, It's working.
Many tks, Ashish for your time.
---
Alexandre.
Hi,
This calculated column formula works
=LOOKUPVALUE([##Real Lead Time],data[Date],CALCULATE(MIN(data[Date]),FILTER(data,data[##WO+LN]=EARLIER([##WO+LN]))),data[##WO+LN],data[##WO+LN])
Hope this helps.
Hello Ashish,
I was already looking for lookupvalue and ealier, but I couldn't find the same like you suggested.
Anyway... I use your example, and I got this error message:
Remember, I'm using this as a calculated column.
I was wondering, may you explain, why you use twice on the end the "data[##WO+LN]"? I want to understand your logic to learn a little more.
So, tks for your time.
---
Alexandre
Hi,
Share the link from where i can download your PBI file and show the expected result there.
Here you go:
https://drive.google.com/file/d/1cXk5ZjKGJLfMroA40Kp6YCU1i7TK3gq7/view?usp=sharing
tks,
Alexandre
I am unable to open the file. When i double click, i just see the splash screen.
Download it. Click on red highlight.
https://drive.google.com/file/d/1cXk5ZjKGJLfMroA40Kp6YCU1i7TK3gq7/view?usp=sharing
The problem is not with downloading. When i double click to open the file, the file freezes at the splash screen. I am able to open other PowerBI Desktop files just fine.
oh no!!!
Anyway, I have find a solution.
I follow this aproach: https://stackoverflow.com/questions/73722277/find-the-first-value-by-category-dax
First, I created a Index column on Power Query.
After that, I created a calculated column with Group Rank:
and finally, I added another calculated column:
Now, It's working.
Many tks, Ashish for your time.
---
Alexandre.