Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
bimala0507
Partner - Creator
Partner - Creator

How to display dimension value along with an expression in pie-chart

Dear experts:

Can anyone help me in guiding how to display Dimension Value along with an expression in pie-chart.

I am using the below expression

=Dual( $(=GetCurrentField([Factory Country])) & ' (' &num(sum( [Avg. Tot Capacity Per Week]),'#,##0')& ')',num(sum( [Avg. Tot Capacity Per Week]),'#,##0'))

Where ([Factory Country])) is the dimension

I have used similar kind of expression in other qvw, which worked fine, however it does not work here. It throws out an expression saying  "No Data to Display", however there is data.

Kind Regards,

Bimala

2 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

I assume that [Factory Country] is a cyclic grouping. Its hard to diagnose this problem without a sample qvw file that illustrates the problem with your data. Is it possible that one or more fields from the cyclic are not associated in any way with the [Avg. Tot Capacity Per Week] metric?

Although the syntax of your expression looks OK, you could simplify it slightly by removing redundant parts of the expression:

=Dual(GetCurrentField([Factory Country]) & ' (' & num(sum( [Avg. Tot Capacity Per Week]), '#,##0') & ')', sum( [Avg. Tot Capacity Per Week]))

HTH

Jonathan

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

Hi Bimala,

try this expression:

Dual(

(yourField) &'-'&
Num(sum(YourValue/Field), '#,##0') &

Repeat (chr(13) & chr(10), rank(sum(YourValue/Field))-6),

Sum(YourValue/Field)

figure 6 does mean that 6 is a Rank, the function repeat doesnt kick you in until get to the seventh ranked value in the dimension.

i hope

this helps

Beck