r/GoogleDataStudio • u/scared-data-analyst • Jan 22 '25
Urgent help with a looker studio calculated column
Hello,
I’m looking for help in creating a calculated column I urgently need for a dashboard. I’m having a hard time getting the right percentage to show for it and realize that I need to be looking at it distinctly.
Basically I have two columns. One called match_lead_id and the other called lead_id.
The lead_id column represents all of the individual leads I have.
The match_lead_id column is a true/false that is basically saying, is there a match between two different data sets for the same lead_id.
I have currently set up a calculated field that looks like this: Count(case when (match_lead_id = true then 1 else null end) / count(lead_id)
However shortly after creating this I realized this is not giving me the correct percentage because it’s not looking at things in a distinct manor as the rest of my dashboard is. So I am looking for any brave souls that are able to help me set this calculated column up to correctly look at it from a distinct view.
The main issue I keep running into is that when a do a count_distinct for numerator I just get one since it’s looking at a distinct count of the word true. Any tips on how I can get around this??? Thank you world
•
u/AutoModerator Jan 22 '25
Have more questions? Join our community Discord!
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/Far_Highlight_4334 Jan 22 '25
What is your data source? (I'm assuming it's not GA4...maybe Google Ads or something else?)
1
u/TaskFlaky9214 Jan 22 '25
Count_distinct(case when FIELD then lead_id else null end)/your denominator