Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
maxloveiii
Contributor III
Contributor III

Aggregation summary of Price Diff (Current Month - Previous Month)

Hello,

I attempted to create an expression for calculating the summary of price changes between the Current Month and Prior Month over a span of one year. However, when I applied aggregation to summarize the data, the function yielded an incorrect result. I'm seeking suggestions on how to address this issue. Unfortunately, fixing it in the load script is not feasible because the design involves comparing prices from various sources.

Sum(Aggr(Avg([TP Act.]) - Above(Avg([TP Act.])),[TP Cust],[TP Mat], [TP Curr],TPMonth))

Thank you in advance.

maxloveiii_0-1706870838395.png

 

Labels (2)
1 Solution

Accepted Solutions
Anil_Babu_Samineni

@maxloveiii We all helping on assumption bases only, I would suggest to share sample data set to check in detail where the problem can found or to demonstrate. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

7 Replies
Anil_Babu_Samineni

@maxloveiii I wonder why this is highlighted? Also, It is good to show the expected result as well.

Anil_Babu_Samineni_0-1707022475926.png

 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxloveiii
Contributor III
Contributor III
Author

@Anil_Babu_Samineni 

I apologize for the unclear question.

Desired outcome: Price - A = B. However, when I utilized the expression F, the result by row appears to be incorrect. I may have overlooked something. Can you please point out any mistakes I might have made?

maxloveiii_11-1707056520891.png

 

Anil_Babu_Samineni

@maxloveiii I believe B,C,D and F are your test expressions and you indeed needed only one expression. 

If so, please select 2 or 3 months and share the outcome what you expect. Because, I assume there is something missing in Above().

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxloveiii
Contributor III
Contributor III
Author

@Anil_Babu_Samineni Indeed, you are right. I am looking for a single expression that I can utilize in another chart. Please refer to the example below for clarification.

maxloveiii_0-1707201584611.png

 

 
 
 
 
Anil_Babu_Samineni

@maxloveiii Try with Above(Total ..)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxloveiii
Contributor III
Contributor III
Author

@Anil_Babu_Samineni Thank you for your prompt response. I attempted to follow your suggestion, but I'm still encountering incorrect results. Perhaps I should explore alternative solutions that don't rely on the Above() function.

maxloveiii_0-1707270528767.png

 

Anil_Babu_Samineni

@maxloveiii We all helping on assumption bases only, I would suggest to share sample data set to check in detail where the problem can found or to demonstrate. 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful