I am trying to create what seems should be a simple task.
I want to be able to run a BAQ (or Dashboard if necessary) that will allow the user to select the single MONTH and YEAR for quotes created.
I currently have the following tables / fields utilized…
QuoteHed.QuoteNum
QuoteHed.TotalGrossValue
QuoteHed.DateQuoted
QuoteDtl.ProdCode
And… one more cool trick I have done to do this kind of summary…
create TWO BAQs… and put both of them on the dashboard. BAQ1 publishes the Year/Month, and BAQ2 Filters on it.
BAQ1 is a fully summarized BAQ that only shows unique records for the Year and Month calculation
BAQ2 also has the year and month calculation
In the dashboard, when you refresh, BAQ1 will run, and show all years and months that you have quotes for (you could sort from newest to oldest) then as the user clicks on each month, BAQ2 would automatically refresh to that year/month.
This type of design makes for elegant functionality with very little additional work.
What I’ve usually ended up doing in this case is one of two options:
Create a calculated field in the BAQ which is actually a string, and populate it with the month and year of the date, ideally in the form “YYYY MM” or similar. FORMAT([yourdatefield], ‘yyyy MM’)
Create a calculated date field in the BAQ, and populate it with the first day of the month of the actual date, then format it to show only the month and the year. DATEADD(d, 1 - DAY([yourdatefield]),[yourdatefield])
Either of those give you a field which the user understands can be filtered to a particular month in one step. I’ve found many people are confused by having to filter month and year in separate fields.
Everyone’s help has been great. Problem 1 solved. Now management has added extra requirement that I am also having difficulty dealing with.
Basically I need to categorize the quotes based upon the first line of the quote.
So, I added QuoteDtl_QuoteLine to the BAQ and Dashboard.
I thought I had that figured out by using a filter in the Dashboard as follows:
ColumnName: QuoteDtl_QuoteLine
Condition: =
Value: 1
My problem is if the salesman deletes line 1 of the quote in a revision, then the quote does not show up in my results.
I can’t figure out how to return the first line of the quote in the BAQ or the Dashboard.
Any suggestions…