Hi, everyone. I'd hoped that the answer to this question was kind of simple but I'm worried it's actually much more complex than I realized. Basically, what I want is a sheet to display the Top "N" Orders (based on Profit), with the "N" being controlled by an integer parameter.
However, I would like for the heading to display something to the effect of "Showing top 'N' of [total number of possible] orders." I'd like the [total number of possible orders] to be a calculation that is variable depending on the Date Range that is chosen for the sheet. The options for date range are: "All," "Month to Date," "Year to Date," and "Trailing 12 Months."
Some of the specific details are changed here as I had to recreate what I'm actually doing with the Superstore data, but that's the basic idea.
So I can create a COUNTD([Order ID]), and place that alone on a separate sheet with my [Date Range filter], and it'll show the correct number of orders that fall into that date range. However, when I pull that calculation onto the actual sheet I want to use it on, the calculation fails and only returns "1."
I assume that I need to make some kind of { FIXED } calculation in order to keep the number consistent, but I'm not incredibly familiar with { FIXED } calculations, and I couldn't figure out how to configure it to work with my Date Range filter so that it shows the correct numbers.
I have attached an example using the Superstore sample data. The red "XX" in the header on the "Top N Claims" sheet is what I'm looking to have calculate the total possible number of orders for the given date range. The second sheet, "Separate Count," shows my COUNTD calculation showing the correct numbers. I just don't know how to get that number to display in the header on the actual "Top N Claims" sheet.
Any help is very much appreciated, thank you!
Put your Date Range filter in Context and add an LOD expression directly on your Marks card (or create a calculated field). LOD calculations ignore filters unless they are in Context, so won't be affected by your Top N.