Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

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 (2)
5 Replies
agigliotti
MVP
MVP

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.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
tmumaw
Specialist II
Specialist II
Author

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 ))))

agigliotti
MVP
MVP

please mark an answer as solution if applicable.

The Power of shining a light on the dark side of your data.
Follow me on my LinkedIn | Know Gamma Informatica at gammainformatica.it
tmumaw
Specialist II
Specialist II
Author

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.

tmumaw
Specialist II
Specialist II
Author

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