Calculating count average from averages

0 votes

I've a calculated field in Tableau which has the Years (Date Value) from a date field. When I compare this calculated field with year of another field, I get error.

IF calculated_Field = YEAR(order_date)
...

1) calculated_Field is the one created using Date value of another field.

2) Order_date is a datetime field.

Error I see in the above IF statement says "Cant compare YEAR and INT values". When I solved that using below statement, it does not work as expected as IF returns FALSE.

IF INT(calculated_Field) = YEAR(order_date)
May 28, 2018 in Tableau by Mahima Choudhary
18 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Tableau

0 votes
1 answer

Tableau count average from averages

Hi Nithin, 1. You create a calculated field ...READ MORE

answered Mar 13 in Tableau by Cherukuri
• 17,790 points
28 views
0 votes
1 answer

How to calculate weekly average from daily data?

You can create these calculated fields: Unique Weeks ...READ MORE

answered Jun 26, 2018 in Tableau by Atul
• 10,240 points
41 views
0 votes
1 answer

average line on chart of averages

Hi Anitha, To add average line already aggregated ...READ MORE

answered Apr 23 in Tableau by Cherukuri
• 17,790 points
22 views
+2 votes
1 answer
0 votes
0 answers

How to export the IdP (Identity provider) XML Metadata from Keycloak which is imported to Tableau?

Keycloak version 1.6.1, Goal: Keycloak should act ...READ MORE

Mar 28, 2018 in Tableau by Atul
• 5,530 points
317 views
0 votes
1 answer

how to get the count of non zero values in a row

In first part you should solve the ...READ MORE

answered Apr 4, 2018 in Tableau by Atul
• 10,240 points
105 views
0 votes
1 answer

Calculated filed with if-then

Below is the required code:  IF (NOT ISNULL([test2])) ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
50 views
0 votes
1 answer

How to calculate profit when cost and revenue are in same column?

You can create the following calculated fields: Profit: SUM(IIF([account_category] ...READ MORE

answered Apr 10, 2018 in Tableau by Atul
• 5,530 points
55 views
0 votes
1 answer

Creating a calculated field with LOD expression

Go ahead and try the following three ...READ MORE

answered Apr 20, 2018 in Tableau by Atul
• 5,530 points
70 views
0 votes
1 answer

How to determine average per event by year?

Hi Roshan, Create a new calculated field (use ...READ MORE

answered Sep 25, 2018 in Tableau by Machdata
• 340 points
44 views