Running calculations off aggregate data that can be filtered

First off, hello community this is my first post. I find most of my answers through other threads but I'm having a difficult time getting an answer for my current issue. Let me start with a simplified example of what I can do manually, and what I'm trying to automate in Looker

In a normal sheet (I use Excel) I might have the following columns: ID, Area, Sale price, Expected Price. This is data I pull, and then I use formulas to the following: Get the ratio of Expected vs Sale price for each ID occurrence. I then calculate to median of those ratios using the aggregate formula (so I can then filter by Area). I then get the absolute difference of each ratio against the median, and finally the average of the absolute differences. For those who use this statistic, I'm creating the coefficient of dispersion (COD). Then when someone asks me for a report update on each area, I have to manually filter the data and key in the COD for a report.

Now I've done a lot to put many of my reports into a single user interface dashboard using Looker, complete with drill-down visual aids and all. The only thing I have yet to figure out, is how to replicate the above process. Basically I'd like for a user of my dashboard to choose any or all Areas and get their COD at will (as I update the database constantly now with Looker) and therefore they don't have to ask me, but can just go look.

I know I could create this by having a database where there is a table for each separate Area, but that feels cumbersome to generate, and there are other parameters in my database I would like to use to also generate metrics such as COD (such as seeing COD for Regions, and then drilling down into smaller Areas within, or other filters users come up with wanting to utilize). I'm pretty sure I'm needing to delve deeper into the true coding side of these analytics, but I'm having trouble nailing down exactly how to go about it.

Thanks

Solved Solved
0 1 876
1 ACCEPTED SOLUTION

It's more complaicated and Looker Studio itself wont allow you to do it due to some limitations.
A work-around would be custom query from BigQuery withh all of tthese computation done on a row level basis and maintaining aggregated fields to be computed in Looker.

The custom query is needed as you want to allow filtering. Its not easy to explain how to do this but definitely doable. You can try to contact me using net and I can guide on on a video call how to overccome this in Looker Studio.

Arkady Zagdan

View solution in original post

1 REPLY 1

It's more complaicated and Looker Studio itself wont allow you to do it due to some limitations.
A work-around would be custom query from BigQuery withh all of tthese computation done on a row level basis and maintaining aggregated fields to be computed in Looker.

The custom query is needed as you want to allow filtering. Its not easy to explain how to do this but definitely doable. You can try to contact me using net and I can guide on on a video call how to overccome this in Looker Studio.

Arkady Zagdan