
Tips Recipes Brio 2002
Copyright © 2002, Brio Software Page 27
Section Type: Results or Table section
Tip Name: Count of Participants #2
Counting the number of stores in each state while also calculating the
sum of all revenues.
Purpose / Use: Since you are also analyzing a total for each state, you can’t simply create
a query with Count(Distinct Store_Name).
Sample File: State count solution.bqy
Steps to Produce: The secret here is a creative combination of sorting the Results set and
using the Next or Prior function in a computed item.
1) Select the Results section, and sort by State and Store_Name.
2) Create a computed item called Store_Cnt with the following definition:
if ( Prior ( Store_Name) != Store_Name) { 1 }
else { 0 }
The sorting insures that a new Store Name also means a new store to count.
3) Now, build your pivot, using the category field as labels and the dollar amount field and
the new Store_Cnt computed item as the values.
Komentarze do niniejszej Instrukcji