1 2 Previous Next 20 Replies Latest reply on Feb 18, 2016 6:58 PM by Amanjot Klair

# ATTR Problem

Hi,

I am connecting excel sheet with database with a common linking field. Excel contains a Field "TAT" containing Whole number only. WHen I use IF function on TAT, I am getting ATTR

with the field automatically...

The following is the Calc: ( the name of the excel file is : "Ajeet_Tableau TAT - 20160213"

====================================================================

IF DAY([Ship First Outscan Time Dc]) > 0

then

( IF ATTR([Ajeet_Tableau TAT - 20160213].[TAT])   >= [Date Diff for Att]  then 1 else 0  end )

else 0

END

=========================================

IF DAY([Ship First Outscan Time Dc]) > 0

then

( IF [TAT])   >= [Date Diff for Att]  then 1 else 0  end )

else 0

END

==================================

Can anyone explain this pls ?

Regards,

Ajeet

• ###### 1. Re: ATTR Problem

Hard to tell anything unless you attach the workbook.

I guess you are blending your data from multiple sources and in such a case whatever you refer to in the secondary source must be an aggregate. Depending on what your goal and data structure is it still may be feasible...

• ###### 2. Re: ATTR Problem

Hi Lukasz,

I am connecting mySQL db with excel...I cannot attach packaged workbook as it is not extracted...I have attached workbook.. Take a look at this pls. The calculated field "TAT Adherence" is a bit problematic.

• ###### 3. Re: ATTR Problem

try out the following syntax:

IF DAY([Ship First Outscan Time Dc]) > 0

then

( IF ATTR([Ajeet_Tableau TAT - 20160213].[TAT])   >= attr([Date Diff for Att] ) then 1 else 0  end )

else 0

END

• ###### 4. Re: ATTR Problem

Tableau kumar

Hi,

I am getting following error:

" cannot mix aggregated and non-aggregate comparisons or results in 'IF' expressions"

Regards,

Ajeet

• ###### 5. Re: ATTR Problem

I opened your workbook and can see 1 data source and your calculation seems exactly what you want.

Where is the problem?

• ###### 6. Re: ATTR Problem

The problem is when I connect the excel with mysql db.. The excel sheet contains a column called TAT. I am connecting this excel with the help of linking field to get out the TAT...

• ###### 7. Re: ATTR Problem

Can you show the same screen print as I did but with your workbook where you have the problem?

Are you using multiple data sources in your workbook or not?

• ###### 8. Re: ATTR Problem

I am using multiple data sources Lukasz..

• ###### 9. Re: ATTR Problem

On which common field are they related?

• ###### 10. Re: ATTR Problem

At the 'Origin' FIeld

• ###### 11. Re: ATTR Problem

It is not easier to understand your situation until you share the sample data.

• ###### 12. Re: ATTR Problem

Since you have not shared the other source I duplicated the excel one and blended using [Origin] field.

The same calculation from the secondary source is shown. If that is not what you need then I will not be able to help as you do not want to share twbx or even a screenshot...

• ###### 13. Re: ATTR Problem

Hi,

Pls see the screenshot.....

• ###### 14. Re: ATTR Problem

if it is the same calculation in both sources why don't you drag and drop that calculation from the secondary source as I did in my example?

If you have to create a calculation in your primary source that takes values from the secondary then all those values must be aggregations, e.g. SUM(), MAX(), etc. but ATTR() will surely yield '*' (asterisk) sometimes and you cannot compare that as if it was a value...

1 2 Previous Next