Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Specialist
Specialist

Image as a dimension based on a calculation

Hi Everyone,

Hopefully everyone is staying safe and healthy.  I'm trying to create a calculated dimension based on sales for a customer.  Here is the calculation I am using for the dimension, but I have something messed up.  I'm thinking I need an AGGR, but not too sure.  Thanks

 

If(Sum({<d365prd_salesorderdetail.davey_sold = {1},[d365prd_opportunity.davey_renewalyear]= {$(=$(vFisYr0))}>}d365prd_salesorderdetail.extendedamount) > 0 and
Sum({<d365prd_salesorderdetail.davey_sold = {1},[d365prd_opportunity.davey_renewalyear]= {$(=$(vFisYr1))}>}d365prd_salesorderdetail.extendedamount) > 0,'qmem://<bundled>/BuiltIn/check_g.png','qmem://<bundled>/BuiltIn/cross_r.png')

Labels (1)
5 Replies
Highlighted
Partner
Partner

Re: Image as a dimension based on a calculation

maybe this:
=Aggr( If(
Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr0))} >}
d365prd_salesorderdetail.extendedamount ) > 0
and
Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr1))} >}
d365prd_salesorderdetail.extendedamount ) > 0,
'qmem://<bundled>/BuiltIn/check_g.png',
'qmem://<bundled>/BuiltIn/cross_r.png'
), customer )

I hope it can helps.

Highlighted
Specialist
Specialist

Re: Image as a dimension based on a calculation

Worked great, but forgot about checking for both to be equal to zero.....

=Aggr(If(Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr0))} >} d365prd_salesorderdetail.extendedamount ) > 0 and
Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr1))} >} d365prd_salesorderdetail.extendedamount ) > 0,'qmem://<bundled>/BuiltIn/led_g.png',
(If(Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr0))} >} d365prd_salesorderdetail.extendedamount ) = 0 and
Sum( {< d365prd_salesorderdetail.davey_sold = {1}, [d365prd_opportunity.davey_renewalyear] = {$(=$(vFisYr1))} >} d365prd_salesorderdetail.extendedamount ) = 0,'qmem://<bundled>/BuiltIn/led_r.png','qmem://<bundled>/BuiltIn/led_y.png',Ship_mca_sapaccountid ))))

Highlighted
Partner
Partner

Re: Image as a dimension based on a calculation

please mark an answer as solution if applicable.

Highlighted
Specialist
Specialist

Re: Image as a dimension based on a calculation

The first solution worked, however I forgot to check if both fields are equal to zero.  See the post below your solution.  For some reason it does not work.  Thanks for your help.

Highlighted
Specialist
Specialist

Re: Image as a dimension based on a calculation

The first response worked, but I need to add another expression and when I did it stopped working.