Using parameters, I'd like to know if it is possible to have only one Aggregate measure (in a cross table or in a graph for example) that could be either a "Sales" measure (in Euros) or a "Quantity" measure coming from my datasource.
The "switch" from Sales to Quantity would be done using a button bar or a dropdown list.
This way, I have only one object (graph...) and the user can switch easily from one to the other.
I tried but I don't see first How to create a button or a dropdown list that would display "Show Quantity" or "Show turnover" .
One approach would be to create a button bar with a 'helper' category assigned to it, where the helper category has the values 'Sales' and 'Quantity'. You would also assign a character parameter to this button bar.
Then, you would create a calculated item that would look something like this:
IF ( 'helper'p = 'Quantity' ) RETURN 'Quantity'n ELSE 'Sales'n
And when this calculated item is assigned, we get a result like this:
Depending on the button bar selection, the chart will show the data from either the Quantity measure or the Sales measure.
Now, the drawback to this approach is you can only assign one label, one format, and one aggregation for the calculated item. But this might be fine if the data are similar.
Let me say here that I am not an expert on all the workarounds of report building, and someone else may have a better way to implement the above approach.
The much simpler alternative is to use a stacking container with separate objects for the two measures.
Here, there are separate charts for Quantity and Sales, but only one is shown at a time depending on which item in container is selected.
Hopefully one of these approaches will work for you. Let us know!
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.