Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
27 | |
20 | |
15 | |
12 |
User | Count |
---|---|
58 | |
50 | |
44 | |
19 | |
18 |