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.
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!!!
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 |
---|---|
109 | |
98 | |
80 | |
64 | |
57 |
User | Count |
---|---|
145 | |
111 | |
92 | |
84 | |
66 |