Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply

Calculating Sales when category is upgraded

Need Help - Calculating Sales when category is upgraded yesterday I am a learner, learning from all of you wonderful people.

I am stuck with a problem tried all the ways but cannot get it.

I have 4 categories of salespeople Ranked as per the highest

1) Diamond(Top Category)

2)) Gold (2nd)

3) Silver (3rd)

4) Bronze (4th)

Have sales figures likes this Category / Sub Category/ Sales ID / Sales Person.

Wanted to know if there are 3 people in Silver category, in April 23, the supervisor moved them on May 23 to Gold then what was the incremental / lower business done. Sales ID is Unique, Out of all people in silver category, 3 people in April 23 figures were like this ID 1 – 100 ID 2- 240 ID 3- 124 If in May 23 since their boss moved them to upper category for eg gold their figures become like this ID 1 – 120 ID 2- 250 ID 3- 140 Incremental nos is 46 with count 3, similary even after moving them up if they don’t done anything when what is the cumulative figures. Thanks every one

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Hi @santoshlearner2 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.  

vtangjiemsft_0-1693452017918.png

(2) We can create a measure. 

 

Incremental Sales = 
   CALCULATE(SUM(Sales[Sales]),FILTER(Sales,Sales[Category]="Gold" &&  Sales[Sales ID] IN {1,2,3})) -
   CALCULATE(SUM(Sales[Sales]),FILTER(Sales,Sales[Category]="Silver" &&  Sales[Sales ID] IN {1,2,3}))

 

(3) Then the result is as follows.

vtangjiemsft_1-1693452067542.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

2 REPLIES 2

Thank you for your help, it was very sweet of you to do so. Thank you

v-tangjie-msft
Community Support
Community Support

Hi @santoshlearner2 ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data.  

vtangjiemsft_0-1693452017918.png

(2) We can create a measure. 

 

Incremental Sales = 
   CALCULATE(SUM(Sales[Sales]),FILTER(Sales,Sales[Category]="Gold" &&  Sales[Sales ID] IN {1,2,3})) -
   CALCULATE(SUM(Sales[Sales]),FILTER(Sales,Sales[Category]="Silver" &&  Sales[Sales ID] IN {1,2,3}))

 

(3) Then the result is as follows.

vtangjiemsft_1-1693452067542.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors