locked
Add condition on group level RRS feed

  • Question

  • User-960441985 posted

    I have 3 columns (number, code and comments). I have groups values on 'number' (1001, 1002, 1003). this is requirement. I have code values (IN, OUT). I need to set color condition where  product is IN and number is 'not same'.

    I have grouped by 'number' and my condition is not working on background row color. what changes are required.

     MY DATA

    NUMBER    CODE      COMMENTS

    1001                 IN             N/A

    1001                 OUT          N/A

    1003                 IN             N/A (apply color on this only)

    MY CONDITION

    =IIF(Fields!Log_Code.Value="IN" and Fields!Log_Code.Value="OUT", "transparent",
    IIF(Fields!Log_Code.Value="OUT", "red",
    IIF(Fields!Log_Code.Value="IN", "yellow", "green")
    )

    Monday, August 10, 2020 12:40 PM

Answers

  • User-939850651 posted

    Hi Ramjee,

    Based on your description, I created a simple example to fulfill your requirements.

    After grouping, you can use the CountRows() function to determine whether there is only one row in the group. This is the record whose Number is different from other rows.

    Please try this:

    =IIF(Fields!code.Value="IN" and CountRows("number")=1,"Red","Transparent")

    Result:

    Hope this can help you.

    Best regards,

    Xudong Peng

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 12, 2020 7:05 AM

All replies

  • User-939850651 posted

    Hi Ramjee,

    Based on your description, I created a simple example to fulfill your requirements.

    After grouping, you can use the CountRows() function to determine whether there is only one row in the group. This is the record whose Number is different from other rows.

    Please try this:

    =IIF(Fields!code.Value="IN" and CountRows("number")=1,"Red","Transparent")

    Result:

    Hope this can help you.

    Best regards,

    Xudong Peng

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 12, 2020 7:05 AM
  • User-939850651 posted

    Hi Ramjee,

    Have your problem solved?

    Monday, August 17, 2020 9:34 AM
  • User-960441985 posted

    Yes. I have marked as answer

    Monday, August 24, 2020 11:56 AM