2

The intro for this little problem starts here: Adding values to a Report when there is no Data in query SSRS

After that: Adding values to a Report when there is no Data in query SSRS Between Datasets

Now a basic introduction of what Im trying to accomplish. With this expression:

=IIF(IsNothing(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G2.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most")) = True, "0", Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G2.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most"))

What I'm doing is check if the combination of a Somefield.Value-reportitemName.Value exists on the other Dataset where said content is saved in a calculated field inside that other Dataset. When the IsNothing is true, then put a "0" if not, "Dosomething" which in this case it doesn't matter.

So the idea was to put 0 each time it doesn't exist that combination for the Dataset Im right now.

Now, the idea is to do the same but when the other Dataset does not have values.

Imagine my tablix have "Dataset" where in a certain Textbox have that expression but at the same time it could be possible that "Dataset" does not have the values that "Dataset1" have. I can't Nest Lookups because I was trying to do the following:

=IIF(IsNothing(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most")
AND IsNothing(Lookup(Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_Cod_vendedor.Value, "EfectividadDeFrecuencias_Most") & "-" & ReportItems!G1.Value, Fields!Agregar.Value, Fields!total_atados.Value, "EfectividadDeFrecuencias_Total")
)) = True

, "0"

,Lookup(Trim(Fields!total_Cod_vendedor.Value) & "-" & ReportItems!G1.Value, Fields!AgregarMost.Value, Fields!most_atados.Value, "EfectividadDeFrecuencias_Most"))

So to give a more visual example, this was the original Case: enter image description here

See how Dataset2 does not have the same values as Dataset1 so with this Expression it put 0s where is not Equal that combination (Sales Rep+Category).

Now the idea is to the same thing the other way around, when Dataset2 have data that Dataset1 does not have IN THE SAME expression (that means the same textbox where it resides the Tablix which at the same time have the Scope on Dataset).

How would you do this?

Community
  • 1
  • 1
Nickso
  • 785
  • 1
  • 10
  • 32

0 Answers0