Hi there,
I've read a lot of the community forum posts on this topic but I still cannot seem to get it right for my specific use case.
I have a table ("Control") in my app connected to this data:
My current template looks like this:
Author table column:
<<Start:ORDERBY(UNIQUE(Control[Key]), [Author])>><<IF: [Key] = INDEX(ORDERBY(UNIQUE(Control[Key]), [Author]),1)>><<[Author]>><<ENDIF>>
Genre and Book column:
<<Start:ORDERBY(UNIQUE(SELECT(Control[Key], [Author] = [_THISROW-1].[Author])), [Genre])>><<[Genre]>>:<<Start:SELECT(Control[Key], AND([Author] = [_THISROW-2].[Author], [Genre] = [_THISROW-1].[Genre]))>><<[Book_Title]>><<End>><<End>><<End>>
Here is what my PDF output looks like currently, the rows are being repeated for each author record (as blank), regardless if the previous was the same as the current.
And my objective is the have the output look like this:
My question is in two parts, one for group and one for the formatting.
Q1. How do I display the Author in single row, considering there are multiple rows of the same author in my data?
Q2. How do I ensure the formatting of the Genre and Book sits each on a new line, rather than clumped together as a single piece of text? Note that the Genre is bold with the colon. Is this possible?
Thanks a lot in advance, really appreciate it.
As I pointed out in a recent Q&A, you should use Steve's formula.
Data:
Template:
//Author Col
<<Start: ORDERBY(FILTER(“AUTHORSHIP”,[_RowNumber]=MIN(SELECT(AUTHORSHIP[_RowNumber],[Author]=[_THISROW-1].[Author]))),[Author])>>
<<[Author]>>
//Genre and Books
<<Start: ORDERBY(FILTER(“AUTHORSHIP”,[_RowNumber]=MIN(SELECT(AUTHORSHIP[_RowNumber],AND([Author]=[_THISROW-2].[Author],[Genre]=[_THISROW-1].[Genre])))),[Genre])>>
<<[Genre]>>:
<<Start:FILTER(“AUTHORSHIP”,AND([Author]=[_THISROW-2].[Author],[Genre]=[_THISROW-1].[Genre]))>>
<<[Book_Title]>>
<<End>>
<<End>>
<<End>>
Result:
Nice one @TeeSee1 👍
Hi @TeeSee1 , thanks for your suggestion, I will try this out and let you know.
User | Count |
---|---|
35 | |
9 | |
3 | |
3 | |
2 |