Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhaveshp90
Creator III
Creator III

Straight table Column with no data ?

Hello,

I have the Straight table as shown below;

Screenshot (5).png

I am using Cost Code, Cost Area as Dimensions and Value, Value (USD) as expressions.

Expressions:

Value = Value

Value (USD) = Value_USD (Value/Currency_Rate as Value_USD in my script)


Why I am not able to see any data for Value (USD), Can anyone tell me what am I doing wrong here?

thanks

Bhavesh

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Check that Project_Cost_Currency_Key is unique in the Currency_Rate table. And/or check the NoOfRow('Project_Cost') value with trace statements before and after the join. I am pretty sure that the join is doubling the rows.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

8 Replies
vishsaggi
Champion III
Champion III

Can you do like below and if possible can you share a sample to look into?

= Sum(Value)

= Sum(Value_USD)

Anil_Babu_Samineni

Else, Use this feature as this enable for Straight table

Capture.PNG

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jonathandienst
Partner - Champion III
Partner - Champion III

If you are doing this calculation in script, I suggest that you upload the relevent script portion.. Otherwise its just guesswork.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bhaveshp90
Creator III
Creator III
Author

I did change both the expressions to Sum(Value), Sum(Value_USD) but my values are doubled when I do that Capture.PNG

bhaveshp90
Creator III
Creator III
Author

As shown in the image below, my values are doubled when I do Sum of rows feature.

bhaveshp90
Creator III
Creator III
Author

Jonathan, I am creating my table with Cost Code, Cost Area as dimensions and Value, Value_USD as expressions. This is the Calculation I am doing in Script;


Project_Cost:

Load Project_Number &'-'& Region &'-'& if (match(Country_Name,'US','UK','Canada')>0, Country_Name, Capitalize(Country_Name)) &'-'& Snapshot_Date as Project_Cost_Key,

     if (match(Capitalize(Country_Name),'Germany','Belgium','France','Italy','Spain','Netherland')>0,'Europe',if (match(Country_Name,'US','UK','Canada')>0, Country_Name, Capitalize(Country_Name))) &'-'& Year(Snapshot_Date) as Project_Cost_Currency_Key,

     Cost_Code,

     Cost_Area,

     Value,

     Updated_OEC_Budget

 

FROM

(qvd);

left join (Project_Cost)

LOAD

     if (match(Capitalize(Country_Name),'Germany','Belgium','France','Italy','Spain','Netherland')>0,'Europe',if (match(Country_Name,'US','UK','Canada')>0, Country_Name, Capitalize(Country_Name))) &'-'& year(Snapshot_date) as Project_Cost_Currency_Key,

     Currency_Code as Project_Cost_Currency_Code,

     Currency_Rate as Project_Cost_Currency_Rate

       

FROM

(qvd)

where Month(Snapshot_date)='01';

Project_Cost1:

NoConcatenate Load

*,

Value/Project_Cost_Currency_Rate as Value_USD,

Updated_OEC_Budget/Project_Cost_Currency_Rate as Updated_OEC_Budget_USD,

Resident Project_Cost;

drop table Project_Cost;

jonathandienst
Partner - Champion III
Partner - Champion III

Check that Project_Cost_Currency_Key is unique in the Currency_Rate table. And/or check the NoOfRow('Project_Cost') value with trace statements before and after the join. I am pretty sure that the join is doubling the rows.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
bhaveshp90
Creator III
Creator III
Author

Jonathan, you are right it is not a one-to-one relationship. I have missed another condition in the joining.

where Month(Snapshot_date)='01'

and Currency_Ref = 'USD';


Thank you for your explanation