Forum Discussion
Mulitple Conditions (at row level)
Hi Ricky - Thanks for your help.... I get the red squiggly line error right at the very end....(see bolded text). It says it is an "unexpected parameter" error.
Single or Multiple Codes = IF(CALCULATE(COUNTROWS(Flu_RMAs), FILTER(Flu_RMAs, Flu_RMAs[RMA] = EARLIER(Flu_RMAs[RMA],FILTER(Flu_RMAs,Flu_RMAs[Hdr Prob Code] <> EARLIER(Flu_RMAs[Hdr Prob Code]))) > 1, "Multiple", "Single")
- Anonymous6 years agoNot applicable
Check the Data type of your column:
Column Tools --> Data Type: Text
- Anonymous6 years agoNot applicable
Hi Ricky - Just to clarify, I don't already have a column with these values in it (Single or Multiple). This is what I am trying to create.
So just to state my example again, I have a table that list all of our orders (RMA order). In this table, there is a field called Hdr Prob Code. This table is for Orders that have returns....issues....and the Prob Code is a code that defines what the issue is.
Some orders can have multiple problem codes. Some orders just have a single problem code.
I need to be able to distinguish which orders are "Multiple" or which orders are "Single" in terms of how many problem codes are associated with a particular order. Example:
Order # Prob Code Single or Multiple
1234A T2 Multiple
1234A T3 Multiple
3456A T2 Single
So, in this example, Order 1234A appears on two different rows....each with a different problem code....so it gets defined as having "Multiple" problem codes. Order 3456A just appears on one row, and just has one problem code....so it is defined as "Single".
- Anonymous6 years agoNot applicable
I think that the formula who I showed you is correct for what you want to do, so you should try to solve the issue with that formula and you'll win 🙂
Single or Multiple Codes = IF(CALCULATE(COUNTROWS(Flu_RMAs), FILTER(Flu_RMAs, Flu_RMAs[RMA Order #] = EARLIER(Flu_RMAs[RMA Order #])), FILTER(Flu_RMAs, Flu_RMAs[Hdr Prob Code] <> EARLIER(Flu_RMAs[Hdr Prob Code]))) > 1, "Multiple", "Single")ps. Check if you have to use ";" delimiters instead of "," in the queries. It's strange that you receive an error, I think the DAX expression is correct