Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi. I want to create an IF statement that will show:
If a company has duplicate products ordered, but the record was created on different days, enter the text "Resolve"
Solved! Go to Solution.
Hi @Unicorn_Tech,
Try this one, please.
Column = VAR countRecords = CALCULATE ( COUNTROWS ( 'table2' ), ALLEXCEPT ( 'table2', table2[new_licensee2], table2[First Variety], table2[new_quantity] ) ) VAR ifSameCreateDate = CALCULATE ( COUNTROWS ( 'Table2' ), ALLEXCEPT ( Table2, Table2[new_licensee2], Table2[First Variety], Table2[new_quantity], Table2[Creation Date] ) ) RETURN IF ( ifSameCreateDate > 1, "Fine", IF ( countRecords > 1, "Resolve", "Fine" ) )
Best Regards,
Dale
Proud to be a PBI Community Champion
Hi. Thanks for replying: Here is a table roughly of what I'm looking for:
new_licensee2 | First Country Name | First Variety | new_quantity | Plot Code | Creation Date | Result | |
Co . 1 | Algeria | Var 1 | 262.18 | J1 | 28/11/2018 | Fine | |
Co . 2 | Chile | Var 2 | 4 | J2 | 28/11/2018 | Fine | |
Co . 3 | Tunisia | Var 3 | 228.43 | J3 | 28/11/2018 | Resolve | Has 3 items that match: new licensee, First Variety, New quantity, but creation date is different. |
Co . 1 | Brazil | Var 12 | 262.18 | J1 | 28/10/2018 | Fine | |
Co . 2 | Chile | Var 2 | 5 | J2 | 28/10/2018 | Fine | |
Co . 3 | Chile | Var 3 | 228.43 | J3 | 28/10/2018 | Resolve | Has 3 items that match: new licensee, First Variety, New quantity, but creation date is different. |
Hi @Unicorn_Tech,
What should the result be if the [Creation Date] are the same? If this isn't an issue, please try this formula.
Column = VAR countRecords = CALCULATE ( COUNTROWS ( 'Table1' ), ALLEXCEPT ( 'Table1', Table1[new_licensee2], Table1[First Variety], Table1[new_quantity] ) ) RETURN IF ( countRecords > 1, "Resolve", "Fine" )
Best Regards,
Dale
Hi. Thank you for replying. If Creation date is the same, I want it to write "Fine"
Hi @Unicorn_Tech,
Try this one, please.
Column = VAR countRecords = CALCULATE ( COUNTROWS ( 'table2' ), ALLEXCEPT ( 'table2', table2[new_licensee2], table2[First Variety], table2[new_quantity] ) ) VAR ifSameCreateDate = CALCULATE ( COUNTROWS ( 'Table2' ), ALLEXCEPT ( Table2, Table2[new_licensee2], Table2[First Variety], Table2[new_quantity], Table2[Creation Date] ) ) RETURN IF ( ifSameCreateDate > 1, "Fine", IF ( countRecords > 1, "Resolve", "Fine" ) )
Best Regards,
Dale
THANK YOU!!!
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
136 | |
118 | |
101 | |
71 | |
61 |