Aggregating clients for a location while taking into account other locations
Good morning,
background: we use Pyramid 2020.15.046 against a SSAS datasource, tabular model.
I have a user wish, which I don't know how to build.
The user wants to know for a certain location how many clients live there, but do not work at all (not even at a different location). In the example below (raw data), the user wants the end result to look like this:
Amsterdam: 1 client lives there, while not working at all.
So he doesn't want to include Sue, because she does work (albeit at a different location), he only wants to include Ellen. The user is not allowed to see client names because of privacy concerns, so we have to aggregate the results to location level. I only manage my end result to count both Sue and Ellen (while I only want Ellen to be counted, and Sue to be excluded).
Can I make a formulation in Pyramid for this, or is this something which needs to be built in the datasource/datawarehouse?
Example, raw data:
Location client Living location Working location
Amsterdam Dave Yes Yes
Amsterdam Sue Yes No, but works elsewhere
Amsterdam Ellen Yes No, doesn’t work
4 replies
-
@Maaike van den Berg, Erik
-
Assuming your data does clearly distinguish between the two NO values, then you can create the metric in the Formulate module via a simple Data Point object. In order to demonstrate this, I created a sample dataset based on your criteria and my model contains a measure called Count, which is just a count of rows:
I then created a formula that returns the count for clients that live in a location but do not work:
Finally, I created a report that shows the proper counts without exposing the clients.
If you want the result to look exactly like your sample above, you can use the Dynamic Text object in Illustrate to take the results and display them as you wish.
Hope this helps.