Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

yan_foust
New Contributor

Calculated measure doesn't display correctly in chart

Hi,

I've written an expression to filter data. The resulting data is correctly displayed in a table but if I copy the expression to a chart measure, is not displayed correctly.

Here is the expression I am using

=IF([Contract end date]-[Contract start date]=0,(([Opportunity amount]*[Opportunity probability percentage])/100),

IF((Date((MonthStart(today())+365), 'DD/MM/YYYY')

-Date(Date#([Contract start date],'YYYYMMDD'), 'DD/MM/YYYY'))/30

*Sum(([Opportunity amount]*[Opportunity probability percentage])/100)

/SUM((Date(Date#([Contract end date],'YYYYMMDD'), 'DD/MM/YYYY')- Date(Date#([Contract start date],'YYYYMMDD'), 'DD/MM/YYYY'))/30)<=0,0,

(Date((MonthStart(today())+365), 'DD/MM/YYYY')

-Date(Date#([Contract start date],'YYYYMMDD'), 'DD/MM/YYYY'))/30

*Sum(([Opportunity amount]*[Opportunity probability percentage])/100)

/SUM((Date(Date#([Contract end date],'YYYYMMDD'), 'DD/MM/YYYY')- Date(Date#([Contract start date],'YYYYMMDD'), 'DD/MM/YYYY'))/30)))

3 Replies
stascher
Contributor II

Re: Calculated measure doesn't display correctly in chart

What dimensions are you specifying on your chart? And why type of chart are you using?

yan_foust
New Contributor

Re: Calculated measure doesn't display correctly in chart

Hi,

Diemsions in the chart are [Opportunity Stage] which is text and a grouping based on [Close Date]

=IF([Closed date]-today() >=60, 'Close >60 days',

IF ([Closed date]-today() and ([Closed date]-today()) <=60, 'Close 30-60 days',

IF ([Closed date]-today() <=30, 'Close <30 days',)))

Measure is [Amount] in USD

yan_foust
New Contributor

Re: Calculated measure doesn't display correctly in chart

Hi, actually the data displays fine in the table and also in chart unless I use a second calculated dimension

based on closure date:

=IF([Closed date]-today() >=60, 'Close >60 days',

IF ([Closed date]-today() and ([Closed date]-today()) <=60, 'Close 30-60 days',

IF ([Closed date]-today() <=30, 'Close <30 days',)))

Community Browser