
1. Re: Calculations on only one value....
Walt Reed Nov 29, 2016 11:21 AM (in response to sam.hong.0)Hey Sam,
If you want to calculate the percent of total for each Product Category, you can use the following LOD calculation: {FIXED [Product Category]:SUM(Sales)}/{FIXED:SUM(Sales)}
But if you want percent of total for only one specific category, you could use the following: {FIXED [Product Category]:SUM(IF [Product Category]='Bread' THEN Sales END)}/{FIXED:SUM(Sales)}. Then add this to Text or Tooltip.
Cheers,
Walt

2. Re: Calculations on only one value....
sam.hong.0 Nov 29, 2016 11:32 AM (in response to Walt Reed)Hello Walt!
Thank you for the response, I think I am also there with my actual data. When I used your formula, my result is off. I apologize but I forgot to mention I want to calculate this using number of records. Not sure if that would throw anything off? In your formula, I replaced all the "Sales" with "Number of Records"
{ FIXED [Category]: SUM(IF [Category]='Bread' THEN [Number of Records] END)} / { FIXED:(SUM([Number of Records]))} * 100
Bread  248
I have a total of 1958 records. I am expecting the value to be 12.67% but I am getting 26.12%.

3. Re: Calculations on only one value....
Walt Reed Nov 29, 2016 12:11 PM (in response to sam.hong.0)Hey Sam,
I'm not sure why it wouldn't work with using number of recordsit should. Try doing a count of transaction ID or something similar and see if that gives you the correct amount.
Walt

4. Re: Calculations on only one value....
sam.hong.0 Nov 29, 2016 12:24 PM (in response to Walt Reed)Hi Walter,
I just created a test file and your original formula does indeed work. I am not sure why it is not working on my actual workbook. I'll mark your solution as correct answer as my issue might be specific to my workbook. If you have any thoughts on what could throw off the numbers, please let me know!
I tried messing with Global Filters on my test sheet and your formula works on it, so I am not sure what could be wrong with my workbook.
Thanks!
Sam

5. Re: Calculations on only one value....
sam.hong.0 Nov 29, 2016 1:05 PM (in response to Walt Reed)Update!
I had to click on each of my filters and click "Add to Context" and Walter's formula works perfectly.
Thanks again Walter!
Sam