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
297 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, 2019 in Tableau by Cherukuri
• 33,030 points
2,833 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 27, 2018 in Tableau by Atul
• 10,240 points
13,273 views
0 votes
1 answer

average line on chart of averages

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

answered Apr 23, 2019 in Tableau by Cherukuri
• 33,030 points
771 views
+1 vote
0 answers

total percentage from two tables count

Hi, I am in need to calculate the ...READ MORE

Sep 10, 2019 in Tableau by anonymous
• 180 points
462 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 29, 2018 in Tableau by ffdfd
• 5,550 points
2,100 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
1,265 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 ffdfd
• 5,550 points
894 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 ffdfd
• 5,550 points
880 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
655 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP