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,
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.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
13 | |
8 | |
8 |