By Date GROUP Template

Hi,

I want to generate pdf in group. With the help of ref table. Can you tell me which expression is written to generate pdf in group. I want to group date and quantity.

Sec Table Name:- "pdf template"

table name pdf templatetable name pdf template

 

0 6 306
6 REPLIES 6

Hi I need help.

Why is it showing bots error.

<<Start:FILTER( "CAMPUS SCAN SHEET",([_ROWNUMBER] = MAX( SELECT(“CAMPUS SCAN SHEET”[_ROWNUMBER], AND(([_THISROW-1].[CHANNEL]=[CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))

))

))>>

<<SUM(SELECT("CAMPUS SCAN SHEET"[Quantity], AND(([_THISROW-1].[CHANNEL] = [CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))

))>>

Error 1 : 'Process for PDF template - 1' task 'New step Task - 1' Body template. Expression 'Start:FILTER( "CAMPUS SCAN SHEET",([_ROWNUMBER] = MAX( SELECT(“CAMPUS SCAN SHEET”[_ROWNUMBER], AND(([_THISROW-1].[CHANNEL]=[CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))))))' is invalid due to: Unable to find column '_THISROW-1'.
Error 2 : 'Process for PDF template - 1' task 'New step Task - 1' Body template. Expression 'SUM(SELECT("CAMPUS SCAN SHEET"[Quantity], AND(([_THISROW-1].[CHANNEL] = [CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))))' is invalid due to: Unable to find column '_THISROW-1'.
Error 3 : The document body is empty

lol, no.

I didn't expect this from you at all. 

Roderick
Community Manager
Community Manager

Hi all, please remember the Community Guidelines and help us keep this space positive + helpful. If you can't help, please allow another member or Googler to attempt the question! 

I'm not an expert, but it appears the error message you are seeing is because the variable _THISROW-1 is not defined. This variable is used to refer to the previous row in the data set, but it is not present in your data set. To fix this error, you need to add the variable _THISROW-1 to your data set. You can do this by following these steps:

  1. Open your data set in a spreadsheet program.
  2. Add a new column to the data set and name it _THISROW-1.
  3. In the _THISROW-1 column, enter the value of the previous row for each row in the data set.
  4. Save your data set.

Once you have added the variable _THISROW-1 to your data set, you should be able to run the code without any errors.

Here is the updated code:

<<Start:FILTER( "CAMPUS SCAN SHEET",([_ROWNUMBER] = MAX( SELECT(“CAMPUS SCAN SHEET”[_ROWNUMBER], AND(([_THISROW-1].[CHANNEL]=[CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))))))>>

<<SUM(SELECT("CAMPUS SCAN SHEET"[Quantity], AND(([_THISROW-1].[CHANNEL] = [CHANNEL]), ([_THISROW-1].[Report Print] = [Report Print]))))>>

When you run this code, it will filter the data set to only include rows where the CHANNEL and Report Print columns are equal to the values in the previous row. It will then sum the Quantity column for the filtered rows.

I hope this helps! Let me know if you have any other questions. If you continue to have issues, @Sirfyaad send me a PM and we can noodle on some ideas. @ShirleyN @Arthur_Rallu any thoughts?

 

@Roderick  Thank you very much for replying.

I have tried many times to fix this error but this error is not getting fixed. Why is this error showing me again and again.

 

CHANNEL WISE

TOTAL SUM

<<START: ORDERBY(

  FILTER(

    "CAMPUS SCAN SHEET",  ([_ROWNUMBER] = MIN(SELECT(CAMPUS SCAN SHEET[_ROWNUMBER], ([_THISROW-1].[CHANNEL] = [CHANNEL]))))

  ))>>

<<SUM(SELECT("CAMPUS SCAN SHEET"[Quantity], AND(([_THISROW-1].[CHANNEL] = [CHANNEL]))))>>

<<END>>




bots errorbots error

Top Labels in this Space