Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

Get the % of an Item Category

$
0
0

So I'm trying to get the percentage of an item category from my dataset. Let's say I have the following data:

 

 

NameCategoryOrder DateInventory
ApplesFruits1/1/17100
OrangesFruits1/2/1770
GrapesFruits1/3/1780
ApplesFruits1/4/1720
OrangesFruits1/5/1730

 

Given the following data (total = 300), my output would be Apples = 40%, Oranges = 33.3% and Grapes = 26.7%. Will this be a calculated column or a measure? And how?

 

I took a jab at this and In my actual data, I have 7045 (81.4%) rows of Apples, 1615 (18.6%) rows of Oranges (which amounts to a total of 8660 rows. I tried the following formula:

 

AS % = COUNT(Sheet1[Name]) / Sheet1[Total Rows]

 

But I got a value of 100% for both when I filtered the values using the table visualization.


Viewing all articles
Browse latest Browse all 216047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>