My data file has columns showing different discount rates by type of discount/markup applied on a single line in a sales order. Each row indicates a line in an order with a specific material. I would like to calculate two “calculated columns” - one showing a sum of positive values and one showing a sum of negative values since there will be multiple rates applied on one line depending on different categories. I am not able to figure out a DAX formula without having to create a negative and positive for each type of rate and then summing them up in 2 calculated columns. One other thing just to be clear - a single column i.e. one type of discount can have positive and negative values. Test_Disc_Positive_Negative.xlsx (11.0 KB)
Thank you so much, Rajesh. Very helpful! I understood the simple solution using variables, but I didn’t quite follow the other two. Is there any reading material to understand the solution you have created with calculated column (UNION method)?
For each row, creating a table like below using UNION and ROW
To sum only Positive apply filter on Check = Positive.
Second Solution: Creating the same table using Table Constructor.
When we create Table using Table Constructor first column is Value1 and Second Column is Value2…
Hello @a_nimish! Welcome to the forum It’s great to know that you are making progress with your query.
Please don’t forget if your question has been answered within the forum it is important to mark your thread as ‘solved’.
We request you to kindly take time to answer the Enterprise DNA Forum User Experience Survey, We hope you’ll give your insights on how we can further improve the Support forum.
Hi @a_nimish, due to inactivity, a response on this post has been tagged as “Solution”. If you have any concern related to this topic, you can create a new thread.