by Matt Allington I was helping a friend out recently with an interesting problem. It all started with a SUM( ) that wasn't behaving. It quickly became a SUMX( ) problem but evolved into a DAX Studio/Query problem. Let me…
By Avichal Singh (Avi)
When I was working recently with a client, helping her remotely – I asked her to calculate the sum for sales amount in the table. She responded whether she should use SUM, SUMX or CALCULATE?
Simple question, but not a simple answer. Or I can give you the classic lawyer response – “It depends!” Let’s review.
SUM: Simple Unmitigated Magic
The good news is that a simple SUM, would work in majority of the cases. A simple sum in the hands of Power Pivot is a powerful tool. With the magic of relationships a simple SUM can show you tricks you could never have imagined in Excel.
Power Pivot relationships mean, that you define your measures once and use them everywhere.
“Define Once, Use Everywhere”
Your measures conform to the shape of your pivot, so you can drag and drop any fields from your model, use any slicers and the measures would still work.
Only when you see the results and go…”Uh…that is not exactly what I want”, should you explore other options.
Step at a time – SUMX
In This Case, Getting the Grand Total Correct for Each Row Required SUMX
It’s that time of year again…
…when my love of spreadsheets actually translates into a love of sports. Yes, it’s Compulsive Data Crunching Disease season, AKA Fantasy Football Season.
Fantasy football is a game in which the contestants assemble “portfolios” of NFL players in the same manner that you might build a portfolio of stocks and bonds. Then your portfolio (we call it a “team”) performs well if the real-life NFL players perform well, and poorly if not. The one difference between this and the stock market is that no two “portfolios” can contain the same NFL player – so if I get Peyton Manning, the other contestants in my league (typically 8-12 people) cannot have him.
I’m participating in a new form of league this year, one in which the contestants get to keep some of the players from prior years. (In most fantasy football leagues, you start each year from a clean slate).
We’re going to be picking our players this weekend at an “auction” or “draft,” and naturally, I want to scout my opponents ahead of time. Muhaha.
So, what do my opponents need?
A valid portfolio consists of:
Gantt Chart with Resource Loading Report
The response to POST 1 of this Gantt Chart mini series was swift and it didn’t take long for Vegard to contact me with a query regarding resource loading. Vegard had quickly taken the template and adapted it to include resource hours. The issue existed with getting the total hours for each resource to behave the way he wanted. Naturally, individuals will normally work for a set expected amount of time per day and if tasks are planned which exceed that expectation, it’s obvious that they might not get the work done!
In this post, I’ll start to explain how to adapt the model from the previous post to include resource loading and associated subtotals per individual resource.
You may recall in my last post, COMMISSION CALCULATIONS IN POWERPIVOT, we got to the point where we could dynamically calculate the sales value and attributable commission rate that should be applied based on time, value and team parameters, reading from a Rates table.
In this post, we’ll complete the commission calculation, providing a different value for individuals and the team manager.
Where are we?
Just to recap, we got to the point in my last post where we had calculated [Sales_Value] and [Comm_Rate] as below:
Guest Post by David Churchward You’ll often hear us Accountants referring to things like adjusting for timing differences or prepaying costs or deferring revenue. This is often interpreted as "massaging the numbers", but, believe me, there is a very…