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.
Hello,
Just started using DAX, powerpivot, and power BI and loving it. I'm trying to make a Calc Column for the earliest project date for each of our agents (sample data below). I imagine it looks something like SWITCH(TRUE,AND([Date of Project]=??,[agent code]=??),"FIRST PROJECT","") that goes into the flag column.
but any help would be cool 🙂
AgentCode | ProjectDate | ProjectName | FLAG? |
123456 | 6/4/2019 | Project 212 | |
123456 | 3/1/2020 | Project 564 | |
123456 | 9/23/2020 | Project 951 | |
234567 | 9/2/2020 | Project 367 | |
456789 | 12/7/2019 | Project 852 | |
456789 | 3/9/2020 | Project 264 |
Solved! Go to Solution.
You should probably do this as a measure instead but it is common for people new to Power BI to overuse calculated columns. Here is a column expression to get your result, but it would work as a measure too (in a table visual with the AgentCode column).
First Project Date = CALCULATE(MIN(Table[ProjectDate]), ALLEXCEPT(Table, Table[AgentCode]))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You should probably do this as a measure instead but it is common for people new to Power BI to overuse calculated columns. Here is a column expression to get your result, but it would work as a measure too (in a table visual with the AgentCode column).
First Project Date = CALCULATE(MIN(Table[ProjectDate]), ALLEXCEPT(Table, Table[AgentCode]))
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.