If expression

Dear Sir,

Below works:
SELECT(Dhamaka Points [Dhamaka Points], ([Dhamaka Points Category] = [_THISROW].[Dhamaka Points Category]))

But I need the following:
if Dhamaka Points Applicable is Yes then run above else put the value of Dhamaka Points as 0

Below is the snapshot of the error message:

Solved Solved
0 4 180
1 ACCEPTED SOLUTION

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Total_Solutions

I notice:

  • 2nd input is a list type
  • 3rd input is a yes/no type

and your column Dhamaka Points is set as a text type.
Because of this, you cannot:

  • set a list value
  • have different types between 2nd and 3rd inputs, as explained in the error message

please try:

IF(
   [Dhamaka Points Applicable],
   CONCATENATE(
      SELECT( 
         Dhamaka Points [Dhamaka Points],
        [Dhamaka Points Category] = [_THISROW].[Dhamaka Points Category]
      )
    ),
   "0"
)

Or

IF(
   [Dhamaka Points Applicable],
      SELECT( 
         Dhamaka Points [Dhamaka Points],
        [Dhamaka Points Category] = [_THISROW].[Dhamaka Points Category]
      ),
     List("")
)

Please note, in the second example, you need to set a โ€œListโ€ Type to your column.

View solution in original post

4 REPLIES 4

Aurelien
Google Developer Expert
Google Developer Expert

Hi @Total_Solutions

I notice:

  • 2nd input is a list type
  • 3rd input is a yes/no type

and your column Dhamaka Points is set as a text type.
Because of this, you cannot:

  • set a list value
  • have different types between 2nd and 3rd inputs, as explained in the error message

please try:

IF(
   [Dhamaka Points Applicable],
   CONCATENATE(
      SELECT( 
         Dhamaka Points [Dhamaka Points],
        [Dhamaka Points Category] = [_THISROW].[Dhamaka Points Category]
      )
    ),
   "0"
)

Or

IF(
   [Dhamaka Points Applicable],
      SELECT( 
         Dhamaka Points [Dhamaka Points],
        [Dhamaka Points Category] = [_THISROW].[Dhamaka Points Category]
      ),
     List("")
)

Please note, in the second example, you need to set a โ€œListโ€ Type to your column.

Thanks a Million!! It worked!! God Bless!!

You are welcome.
Remember to check the previous post as a solution, for people who will need help in the future

I have selected it as solution!! Thanx

Top Labels in this Space