cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
paulsmith
New Member

Calculate a number within a tile

Hi

 

I am new to Power BI so apologies if this is a simple question. I have a tile that is used to show items sold, this number comes direct from a table with multiple columns. Some sales are then voided and I want to subtract these numbers from the sales number. The table has a field that shows different statuses such as sold, void, unconfirmed etc.

 

In the tile I apply a date filter and I can also filter on the status column, in the filter I can see the number of sold items and the number of void items. How can I subtract the void items from the sales items, I am assuming this is a measure but not sure how to write this.

 

Many thanks in advance

1 ACCEPTED SOLUTION
parry2k
Super User III
Super User III

@paulsmith here is what you can do, add following meaureS:

 

Sum Quantity = SUM ( Table[Quantity] )

Sum Sold = CALCULATE ( [Sum Quantity], Table[Status] = "Sold" )

Sum Void = CALCULATE ( [Sum Quantity], Table[Status] = "Void" )

Sold - Void = [Sum Sold] - [Sum Void] 

 

You can do above in one measure as well but I prefer separate measure so that it is easy to make changes.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

2 REPLIES 2
paulsmith
New Member

That worked great, thank you for your help.

parry2k
Super User III
Super User III

@paulsmith here is what you can do, add following meaureS:

 

Sum Quantity = SUM ( Table[Quantity] )

Sum Sold = CALCULATE ( [Sum Quantity], Table[Status] = "Sold" )

Sum Void = CALCULATE ( [Sum Quantity], Table[Status] = "Void" )

Sold - Void = [Sum Sold] - [Sum Void] 

 

You can do above in one measure as well but I prefer separate measure so that it is easy to make changes.

 

Check my latest blog post Comparing Selected Client With Other Top N Clients | PeryTUS  I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

Top Solution Authors