Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I want to create a report with the following data

Item | Price | Difference

A | 1.00 | 0

B | 2.00 | 1.00

C | 0.50 | -0.50

How can I get output in this way

A | 1.00 | -1.00

B | 2.00 | 0.00

C | 0.50 | -1.50 

1 Answer

0 votes
by (22.5k points)

Check with the following calculated feilds

"Get parameter select price" = IF [F1 Parameter] = [F1] THEN [Price] END

"Parameter Selected Value for all rows" = {FIXED: MAX(IF [F1 Parameter] = [F1] THEN [Price] END)} 

"Difference" = [Price] - [Parameter Selected Value for all rows] 

Want to be an expert, check the tableau certification course  

Related questions

0 votes
1 answer
0 votes
1 answer
asked Jul 20, 2019 in BI by Vaibhav Ameta (17.6k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...