compare the sum

Hello! I want to do a simple thing:

I have Columns "women" and "men". I want to compare the sum of numbers in these 2 columns, but looker studio is counting how many "1s" and "2s" there are in these columns. What should I do?

Screenshot_1.jpgScreenshot_2.jpg

 

0 5 149
5 REPLIES 5

It looks to me like either "men" or "women" is your dimension, and the default "Record Count" is the metric. This is a mockup of what I think is happening in your case:

Screenshot 2024-04-05 at 11.12.30 AM.png
Instead, you'll want to move "men" or "women" (or both) into the metric section, and then select SUM as the type of metric. This mockup is what I think your goal is:

Screenshot 2024-04-05 at 11.15.31 AM.png

Note that I added the date dimension into the Dimension section so that Looker Studio has something to group by.

I hope this helps!

Hello! Thanks for the help, but I can't do it. How to leave a Dimension empty?
My goal is to create charts of this type, where there is no date (time), just a comparison of 2 metrics

I want one like this
Screenshot_3.jpg 

 

I can do thisScreenshot_4.jpg

Ah, I see. You want to create a pie chart with two metrics and zero dimensions.

Pie charts can only take one metric and one dimension, so we'll need to be creative to massage your metrics into what we need. Here's one idea I have:

1. Create a new dimension "gender" that checks whether there are values in the "men" column, "women" column, or both:

IF(men>0 AND women<=0,"men",
  if(women>0 AND men<=0, "women", "both")
)

gender.png

2. Create a dimension "men and women" which adds up the men and women columns.

men + women

 men and women.png

3. Create a pie chart with the dimension "gender" and the metric as a sum of "men and women".

pie.png

Give it a try!

Thank you!
I tried to repeat it, but it didn't work:(

it's calculates very strangely.
Should be:
women: 10
men: 17

counted:
both: 21
men: 6
Women: 0?

I just want to add columns into tables separately, but the "sun" function does not help me
Screenshot_5.jpgScreenshot_6.jpgScreenshot_11.jpg


so:
Screenshot_7.jpgScreenshot_8.jpgScreenshot_9.jpg

I see. Thanks for trying! 

I think the numbers do make sense - there are 21 values under both columns, and only 6 values that are exclusive to men. But i can see how that's not the value you want. To get the 10 and 17 values, you have to sum over the entire data set. But that isn't possible as long as a dimension must be included.

Really, for this to work, we need the pie chart to support multiple metrics and zero dimensions. I recommend adding your use case to this feature request: Multiple metrics for Pie chart

Top Labels in this Space
Top Solution Authors