
1. Re: How to sum different columns
sander.binda Dec 3, 2019 12:23 AM (in response to HongKai Chen)Greetings,
You need to seperate your results in 3 different measures.
Please find attached workbook. If you have any questions please ask.

Book2_v10.2.twbx 36.8 KB


2. Re: How to sum different columns
shruten parmar Dec 3, 2019 12:29 AM (in response to HongKai Chen)Hi HongKai,
Please find attached workbook.
Yes, you are absolutely right this problem can be solved using the Fixed function.
Please refer the formulas for the fields.
Result A:
sum({ FIXED [mONTH], [Calculation1]:
ZN(sum(if [agency EN] = "A Team" and [#Data Source] = "Type A" then [Count of measure value] end))})
+
sum({ FIXED [mONTH], [Calculation1] :
ZN(sum(if [agency EN] = "B Team" then [Count of measure value] end))})
Result B:
sum({ FIXED [mONTH], [Calculation1]:
ZN(sum(if [agency EN] = "A Team" and [#Data Source] = "Type B" then [Count of measure value] end))})
Result C:
sum({ FIXED [mONTH], [Calculation1]:
ZN(sum(if [agency EN] = "A Team" and [#Data Source] = "Type C" then [Count of measure value] end))})
Please mark as correct and helpful if this helps.
Thanks,
Shruten

Fixed Problem.twbx 43.0 KB


3. Re: How to sum different columns
HongKai Chen Dec 3, 2019 12:49 AM (in response to shruten parmar)Hi Shruten,
Thanks for your help!
the answer is right!
Let me try it more.

4. Re: How to sum different columns
HongKai Chen Dec 3, 2019 12:50 AM (in response to sander.binda)Hi Sander, Thanks for your help! this method is intuition that I can know! thanks again!

5. Re: How to sum different columns
sander.binda Dec 3, 2019 2:04 AM (in response to HongKai Chen)Glad I could help Honkai Chen.

6. Re: How to sum different columns
HongKai Chen Dec 10, 2019 11:21 PM (in response to sander.binda)Hi Sander,
It's very thanks for your help.
We have similar question...need your help.
If we want calculation different value how to calculation this?
like this example, sometimes we will calculate "Count of measure_value"and sometime "countd UID".
In your answer, we can calculate measure_value.
If we want calculate UID, then I think want change calculated filed.
That very complicated, dose any way to change value quickly?
Maybe made Result A,B,C is Dimensions, and "UID, measure value" as measures, then we can easy to change.
Wish you can help us again...
very thanks.
HK

new source.xlsx 3.0 MB


7. Re: How to sum different columns
sander.binda Dec 11, 2019 4:47 AM (in response to HongKai Chen)Greetings,
Can you give me an example when you want to calculate measure value and when you want to countd UID then i can create a calculation based on your example.

8. Re: How to sum different columns
HongKai Chen Dec 11, 2019 5:16 PM (in response to sander.binda)Hi Sander,
Glad to see you again!
I think good result is like this image, follow this criteria and calculation by UID, measure value or other value.
there is our simple data source(new source).
thanks for your help.
HK

new source.xlsx 3.0 MB


9. Re: How to sum different columns
sander.binda Dec 12, 2019 2:15 AM (in response to HongKai Chen)Greetings,
I understand the situation, your new source has some changes in there which makes it very difficult to adjust the calculation, for example you changed the names but also instead of 'Type B' you now have 'GP920' and 'Team B' instead of 'B Team'.
It is still possible to adjust the calculation but then we need to change a bit more than usual. I would advise you to keep using the same names as much as possible
I made the assumption that Type B = GP920
Another thing is that since this count of userID is not in the data but a field in tableau you have to aggregrate the other equations as well. On top of that month and year of test date does not work so you have to take test date field itself.
Lastly, in the previous example month and year were by coincedence operating on the deepest level of detail because Datasource and Agency EN combined are the deepest level, so you have to include this in your LOD calculation.
Please find attached workbook

Fixed Problem.twbx 3.0 MB


10. Re: How to sum different columns
HongKai Chen Dec 12, 2019 4:59 PM (in response to sander.binda)Hi Sander,
Thanks for your help.
GP920 is my mistake, we lose modify it as Type C.
thanks for your carefully, and modify it as Type B.
We try this first.
Thanks again
HK