Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Lakshmanudui
Contributor II
Contributor II

How to take only one field value in paticular table in table box

Hi All,

I have 3 tables, Like table A, Tbale B and Table C.

Table A link with ID in Table B and Table C link with Month in Table B.

In Table C i have filed like Month, Values.

I have table box in that i i have added filed lik Month, values and Table A and Table B metrics also i haved added.

My requirement is in table box values field only see the Table C data, But i am getting Summation of all months data.

Can you please suggest me how to get only Table C values for each Month in table box.

 

Thanks & Regards,

Lakshman

 

Labels (1)
1 Solution

Accepted Solutions
Aditya_Chitale
Specialist
Specialist

You can create a flag in table C in your script like:

Table_C:
load
Month,
Values,
'C' as Table_Flag
From [xyz.qvd](qvd);

Then,  in frontend chart, you can write if() condition in dimension expression to fetch only Table C month values and uncheck include null values option:

=if(Table_Flag='C' , month , null())

OR

You can write set expression in your measure to fetch table C values  only:

=sum({<Table_Flag={"C"}>}Values)

 

Regards,

Aditya

View solution in original post

6 Replies
Aditya_Chitale
Specialist
Specialist

You can create a flag in table C in your script like:

Table_C:
load
Month,
Values,
'C' as Table_Flag
From [xyz.qvd](qvd);

Then,  in frontend chart, you can write if() condition in dimension expression to fetch only Table C month values and uncheck include null values option:

=if(Table_Flag='C' , month , null())

OR

You can write set expression in your measure to fetch table C values  only:

=sum({<Table_Flag={"C"}>}Values)

 

Regards,

Aditya

Lakshmanudui
Contributor II
Contributor II
Author

Hi Aditya,

Thanks for you replay.

I have created flag and i tried that way but it's not working. It will take summation of all months.

 

Thanks & Regards,

Lakshman

 

 

Aditya_Chitale
Specialist
Specialist

Have you tried the set expression method ? According to my sample data, Both methods are working fine. If none of the methods worked for you, please share sample data.

Regards,

Aditya

Marco_Imperiale
Contributor III
Contributor III

Don't use month values as measure, you can simply add as dimension...

Lakshmanudui
Contributor II
Contributor II
Author

Hi Aditya,

I am trying to use Setanalysis also, But it is not working.

My Data is like Table A having date field like "DD-MM-YYYY" formate and Table C having "MM-YYYY" formate.

For the mapping perpose i have derived new field with MM-YYYY formate in Table A and i have mapped with Table C using Month-Year field.

Table C having each month having one record, But Table A having multiple records for each month.

I have used only() aslo, But it's not working properly.

Can you please suggest me if it is data model issues or expression issues.

If it is data model issues can you please suggest me how to provide mapping between these two tables.

 

Thanks & Regards,

Lakshman

 

Aditya_Chitale
Specialist
Specialist

I cannot help much unless I see the data model and actual data. Ideal solution would be to create a flag in script and use that in set analysis. In most scenarios, this solution works perfectly. 

If possible can you share the qvf ?

Regards,

Aditya