6 Replies Latest reply on Sep 13, 2018 4:51 AM by Zhouyi Zhang

# Calculating daily profits but rent keeps summing up

Hey! Just starting with Tableu so the question is probably dumb – sorry about that. Couldn't find the answer myself though, because not sure how to phrase the query. So here is the situatoin:

I have daily sales data for three stores and daily rent for all of them.

I want to calculate daily profits. So I create a calculated field: Sales minus Rent.

But, since the Rent is in every row, it gets multiplied by the number of sales entries.

So it calculates the whole thing wrong.

Please help me fix this

• ###### 1. Re: Calculating daily profits but rent keeps summing up

Hi, Artem

Without seeing your sample workbook, it is not easy to provide a solution, if you can, please share a sample can reflect your issue.

and also, if you can try something like

{Fixed [Store ID]:AVG([Daily Rent])}

ZZ

• ###### 2. Re: Calculating daily profits but rent keeps summing up

Hi Zhouyi! Thanks for responding. Here is the sample workbook

Also I've tried the calculation you gave me – some number did come up but I have no idea what it was

• ###### 3. Re: Calculating daily profits but rent keeps summing up

Hi, Artem

Thanks for your workbook.

Please see my updates attached as well as screenshot below

Hope this helps

ZZ

• ###### 4. Re: Calculating daily profits but rent keeps summing up

Hello,

Please Check the Below answer if it is Correct Or Helpful as per your requirement.

Thanks,

Amar D. Savale

• ###### 5. Re: Calculating daily profits but rent keeps summing up

Zhouyi Zhang thank you so much!

amar savale wow that's an interesting solution. Could you explain how it works?

Particularly, I don't get

1) why you didn't have to use AVG

2) why you multiplied it by 100

3) how to see the total daily profit by store, not by goods

• ###### 6. Re: Calculating daily profits but rent keeps summing up

Hi, Artem

If my reply answers your question, can you mark my answer as correct to close the thread?

ZZ

1 of 1 people found this helpful