I am trying to create a table in which I display the measures names in rows while bringing their respective values (row by row) in a single column which I am calling “dummy_measure” in a way I can mix the solution with PoP analysis which in this case I am using the PoV solution found on this post:
https://community.looker.com/lookml-5/use-refinements-to-add-period-over-period-functionality-to-exi...Please, bear in mind that the image although fanning out, serves us well for illustration purposes, since aside from the fact that the dummy measure is taking the first measure tested in the condition and replicating its value to all the rows, the overall layout shown in the image is pretty much what I am trying to achieve as my end goal.
Here’s how I tried creating the dummy measure:
measure: dummy_measure_01 {
type: sum
sql:
{%if ga_sessions.list_of_values._value != 'Sessions'%} ${ga_sessions.session_visits}
{% else %}
{% if
ga_sessions.list_of_values._value != 'Transactions'%}${ga_sessions.transactions}
{% else %} ${ga_sessions.transactions}
{% endif %}
{% endif %};;
}
The idea behind the measure above is to attempt to have for each row and condition, the value being loaded from other distinct measures.
Has anyone ever faced similar problems who could share some thoughts about this case or even part of it (e.g. having a functional way to achieve the goal with having a Dummy measure properly calculating values row by row each based on other distinct measures would be awesome).
Best,
Solved! Go to Solution.
I came up with the solution below, so if anyone reading this happen to find it useful in any way and decide to use and improve upon this, please consider sharing your improvements here to help the community, specially in formatting the output 🙂
1- Create a view to store your dimension with the name of the measures
2 - Join the new view to your Explore
3 - Create your dummy measure
I came up with the solution below, so if anyone reading this happen to find it useful in any way and decide to use and improve upon this, please consider sharing your improvements here to help the community, specially in formatting the output 🙂
1- Create a view to store your dimension with the name of the measures
2 - Join the new view to your Explore
3 - Create your dummy measure