Solved

Added condition under row style to highlight records based on the profit margin, but it's not working for those lines where revenue budget exist and it's working fine if revenue budget doesn't exist under project --> Revenue Budget


Userlevel 3
Badge

Hi,

 

I have added a condition under row style to highlight records based on the profit margin. However, I have noticed that this condition is not working for those lines where revenue budget exists, but it is working fine if revenue budget doesn't exist under the project's Revenue Budget.

 

For instance, in the below attached screenshot, you can see that the revenue to date is 0 for project P10221, and the cost to date is 487.50 which is highter than revenue to date. However, it is not highlighting this record based on the row style condition set under the GI.

 

attached GI for your reference.

 

icon

Best answer by aaghaei 20 April 2023, 05:48

View original

10 replies

Userlevel 7
Badge +8

Hi 

I am having trouble downloading your XML.  Could you share your formula for row style?

 

Thank you

Userlevel 3
Badge

Hi @rsternberg96

 

Thanks for looking into it, appreciate your help.

below is the formula, which i’ve added under row style.  I’ve also attached project GI for your reference. Hope you will be able to download it from there. 

 

=IIF(( IIf( [PMAccountGroup.Type]='I', [PMBudget.ActualAmount], -[PMBudget.ActualAmount]) < 0), 'red40' , 'default') 

Userlevel 7
Badge +8

It looks like you are using an aggregate function for Costs to Date and Revenue to Date in the result set.  In your Row Style Function you are not using aggregates.  I attempted to update your formula to allow for aggregate calculation but it does not look like aggregates are supported in the Row Style formula.  

 

Edit: 

You can add a column to get your desired result, sadly no color coding. 

 

You can use this formula. 

=IIf(Sum(IIf([PMBudget.Type] = 'E',[PMBudget.CuryActualAmount], 0))>Sum(IIf([PMBudget.Type] = 'I',[PMBudget.CuryActualAmount],0)),'RED','')

 

 

Userlevel 3
Badge

Hi @rsternberg96 ,

Thanks for your quick response to my query, I really appreciated it.

As you mentioned, I’ve used aggregate function on the cost to date & revenue to date and however it appears that  sum formula can’t be applied in the row style condition. 

thanks for your help. i’ll check with client, if they want to proceed to put it in column without any colour coding.

Have a nice day :-)

Userlevel 7
Badge +9

@psoni1585 I haven been to similar situations. The best way to overcome the limitation is to create a projection DAC and aggregate the data as you wish here then in GI use the projection DAC results without aggregation to style the results as you wish. 

Userlevel 3
Badge

@aaghaei, if you can provide me customization code for the projection DAC to add profit margin under project screen, then it will be great for me. 

appreciate your help 👍

 

Userlevel 7
Badge +9

@psoni1585 Sorry, I didn’t mean I had the exact case as yours. I meant styling when you have aggregation in place.

Userlevel 7
Badge

Hi @psoni1585 were you able to find a solution? Thank you!

Userlevel 3
Badge

Hi @Chris Hackett  Unfortunately i’m not able to fin any solution, because I’m using aggregate function in the GI result, so it’s not possible to color code row based on the profit margin.


Thanks. 

Userlevel 7
Badge +9

For the sake of clarification in case someone else comes across this post, it is possible but requires some customizations. Without customization yes it is not possible.

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved