Forum Discussion
Rochejf
3 years agoFrequent Visitor
Return yes when all rows are filled
Hi guys, I'm wondering whether this can be done in Powerbi?
Referring to the table below.
I have 3 sales orders each separate into different sales tasks. What I wish to do now is, when all sales tasks are fulfilled with a date filled in the sales date column, the completion will turn into yes. If none or not all sales task is not fulfilled, the completion will stay as No.
Let me know if such logic can be performed in Powerbi. Thanks!
| Sales Order | Sales Task | Sales Date | Completion |
| SO111 | SO111/1 | 28-Jul-23 | No |
| SO111 | SO111/2 | No | |
| SO222 | SO222/1 | 28-Jul-23 | Yes |
| SO222 | SO222/2 | 28-Jul-23 | Yes |
| SO333 | SO333/1 | 28-Jul-23 | No |
| SO333 | SO333/2 | No | |
| SO333 | SO333/3 | 28-Jul-23 | No |
you can create a new column
Column = if(CALCULATE(count('Table (2)'[Sales Date]),ALLEXCEPT('Table (2)','Table (2)'[Sales Order]))=CALCULATE(count('Table (2)'[Sales Task]),ALLEXCEPT('Table (2)','Table (2)'[Sales Order])),"Y","N")here is a workaround for you.
6 Replies
- ryan_mayu
Super User
you can create a new column
Column = if(CALCULATE(count('Table (2)'[Sales Date]),ALLEXCEPT('Table (2)','Table (2)'[Sales Order]))=CALCULATE(count('Table (2)'[Sales Task]),ALLEXCEPT('Table (2)','Table (2)'[Sales Order])),"Y","N")