Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
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 |
---|---|
14 | |
9 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |