Up until this point, I’ve just used DAX (PowerPivot’s extension to the Excel formula language) to create calculated columns in the PowerPivot window.
There’s a lot of utility in DAX calc columns, but that’s not where DAX really shines. DAX measures let you do things in Pivot reports that simply weren’t possible in Excel before.
In the last video, I mentioned that merely showing raw sales amount didn’t really tell me whether my products sold better or worse in varying temperatures, since there are varying numbers of days of each temperature – perhaps the relatively low sales on Hot days is just because there weren’t many Hot days?
Enter DAX measures, a PowerPivot feature on par with relationships, slicers, and mashups. But you might overlook them on a casual tour through the PowerPivot for Excel addin, since they live behind a single ribbon button.
DO NOT OVERLOOK DAX MEASURES! There is literally a world of power lurking there. I want to make absolutely sure that you grasp them – both their power as well as the “how to,” so I will spend the next couple of posts on them.
First, a word about videos vs. text and screenshots
Awhile back I asked for feedback on which format was preferred – text and screenshots, or videos. Videos got more votes, by about two-to-one. But my text-and-screenshot posts are getting more views than my video posts.
Clearly, those of us who are too busy to watch videos are also too busy to respond to surveys 🙂
I respect that – personally I think I prefer to consume text and screenshots over videos. A video seems like a commitment, whereas scanning text is on my terms, even if on net I spend the same amount of time on either. So here is my new philosophy, always subject to revision:
- I’m going to use videos whenever I am introducing something new, that benefits from the explanatory power of video
- Quick tips and tricks, as well as “power” techniques – I think I’m going to lean toward text and screenshots for these, unless it’s an in-depth technique
- Even when I use video, I’m going to try to summarize the content of the videos – not as an attempt to replicate their content, but more as a table of contents so you know why I think it’s worth your time to watch the video
So, I’ll share the videos first, and a summary after.
PowerPivot DAX Measures Pt 1
PowerPivot DAX Measures Pt 2
(These are the fixed versions from 11/24/09)
- Quick demo of conditional formatting and number formatting, and how surprisingly impactful they are
- The DAX Measure Dialog
- Qty per Day can be calc’d using =SUM([Quantity]) / COUNTROWS(RELATEDTABLE(DimDate))
- Simple formula, but how does it work? Please consult…
- …The Five Golden (and Simple) Rules of DAX Measures
- Home Table = The table where the numeric columns are
- Columns always wrapped in aggregation functions like SUM()
- Calcs always are working against the source tables, not the pivot report
- Two phases: Filter, then Calculate
- Think of things as if they happen cell-by-cell
- Once you grasp those, you can suddenly do AMAZING things