0

enter image description here

Hi Team, I have a SSRS report like this, the users would like to see the data like the picture below. For Column 2 if the value is N/A the values of column 3 would be in list and separated by comma. and the multiple lines will be converted to only one line where N/A is there.

enter image description here

aman6496
  • 143
  • 2
  • 13

1 Answers1

0

First you will want to create row groups for two of your columns. I have assumed they're called Shipment and Description. Then you can use Join and LookupSet to do the CSV aggregation. Similar to the answer here.

Something like this:

=Join(LookupSet(Fields!Shipment.Value & "-" & Fields!Description.Value,
                Fields!Shipment.Value & "-" & Fields!Description.Value,
                Fields!PartNumber.Value, "YourDataset"), ",")
Community
  • 1
  • 1
Derrick Moeller
  • 4,808
  • 2
  • 22
  • 48
  • Can we use if clause in it? iif pname = "N/A" begin Join(LookupSet(Fields!Description.Value, Fields!Description.Value, Fields!PartNumber.Value, "YourDataset"), ",") end – aman6496 Feb 17 '17 at 00:50
  • @AshishMandal You could use inline if, but it shouldn't be necessary? All the descriptions that aren't N/A will only have one PartNumber so no list will be created. – Derrick Moeller Feb 17 '17 at 12:54
  • Thanks, FrumRoll. When i apply the logic you stated at the beginning, it is giving me concat result of all the rows, but the requirement is to get the result for only for the column 1 specific group. is it possible to get the result? please help – aman6496 Feb 21 '17 at 05:41
  • @AshishMandal I've updated my answer, you need to concat your groups prior to applying the filter. – Derrick Moeller Feb 21 '17 at 14:35