ExamGecko
Question list
Search
Search

Question 84 - TDS-C01 discussion

Report
Export

Which of the following is the correct way to calculate Profit Ratio in Tableau?

A.
Profit / Sales
Answers
A.
Profit / Sales
B.
Sales / Profit
Answers
B.
Sales / Profit
C.
SUM(Profit) / SUM(Sales)
Answers
C.
SUM(Profit) / SUM(Sales)
D.
SUM(Sales)/SUM(Profit)
Answers
D.
SUM(Sales)/SUM(Profit)
Suggested answer: C

Explanation:

THIS IS A VERY IMPORTANT QUESTION Aggregation is an important concept to consider when creating calculated fields. A calculated field for SUM([Profit]) / SUM([Sales]) will give you a very different answer than [Profit] / [Sales], even though both formulas are valid. If you do not provide the aggregation within the calculated field, Tableau will calculate the equation for every record ( row ) in your analysis, then aggregate the answers for all of the rows together when the calculated field is added to the view. In simple terms, if specify the aggregation such as SUM, what Tableau will do is that it will first calculate the sum of the Profit column ( say x ), then calculate the sum of the Sales column ( say y ), and then simply apply x/y ---> This is what we expect! Perfect! BUT, if you don't specify the aggregation, it will go to every single ROW, perform Profit / Sales, and then aggregate the answers calculated for each row. This is simply NOT what we wan't! An example:

asked 23/09/2024
HNO Oo
39 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first