DAX variables

When you write DAX expressions it is a general recommendation not to overestimate their complexity. It is always better to create several measures and further consolidate them within the new formula. The code is more transparent, and there is a lot less chance to make an error. Since recently DAX also allows making variables. They are used to create measures that will be used to create an expression that returns final result.

Creating reporting dimensions

Reporting dimensions are all fields that you can see in the Fields menu, which are used to populate reports. Basically, these are the columns in the table model. Also, they can be Calculated Columns or Measures. In some earlier “recipes” I talked about how to create them in PowerPivot model, and now I will show you how to do perform this in PowerBI Desktop. Also, I will mention another interesting novelty: Calculated Tables!

Power BI Desktop

In one of the earlier posts I wrote about that PowerBI comes in many “flavors”: as a Cloud Service (PowerBI.com) as a development environment (PowerBI Desktop), as application for mobile devices available on Windows, Android and iOS platforms (PowerBI Mobile). Since the majority of you who are reading these lines deal with reports development I decided to demonstrate you, in a practical example, how to use PowerBI Desktop.

Slicers in service of calculations

Slicers are graphic objects that are used as an interactive filters for filtering reports in Pivot and Power Pivot reports. In combination with certain DAX functions they can be used for setting the parameters of the calculation. The following recipe will show you how to do a sales report in which, according to chosen exchange rate, you can see results in different currencies. To test a status of a slicer will be used function HASONEVALUE.

From start to finish

DAX has lots of useful Time Intelligence functions and in this recipe I will pay some attention to these that filter aggregations according to beginning or the end of a period. My friends from ASEE would say: “From the cradle to the grave is the most beautiful is go-go phase”. However, in this recipe I would hold to quantitative results, and DAX helps us to determine them in the easy way (that’s my field of expertise)!