During Azure Data Week, Mike Davis showed us some of the basics on Power BI and DAX. There were many questions he was unable to answer during his session and we're happy to share them with you now. If you missed Mike's session or the entire week, you can still purchase access to the recordings by visiting azuredataweek.com.
Below are Q & A from attendees from the session:
What’s the difference between this and Excel?
A: Power BI has many new features and visualization that Excel does not have. Power BI also gets updates on a regular basis so that it keeps getting better.
Does age update automatically or do you have to force a recalc?
A: Yes, it will update when the data is refreshed.
Can you just use Age < 40 in 2nd If since fails 1st condition of < 30?
A: Yes, I could have done that but was trying to make it explicit since this is an intro session.
Is there an advantage/disadvantage to creating columns in DAX vs in the Query Editor (M language)? When would I choose DAX vs M or vice versa?
A: If you can do it in M Query, do it there. Use DAX only for the calculation you need. This will simplify the report for your users.
Wouldn't you use switch in the case with buckets?
A: Yes, I would usually use switch in this case. I was just trying to show nested ‘if's’ since this was an intro session.
I am a new Power BI/DAX user. Can you give an example of how to create a DAX syntax that will have the same functionality as a date slicer where I can select a current year (ex: 2018) + go back 15 years (ex: 2003). The end goal is to select a year in a filter and it will automatically capture that year + 15yrs prior, similar to a date range slicer.
A: Yes, this can be done. The easiest way is to have a start and end date slicer based on the date and let users select the year range they want. If you want to lock them down to 15 years, then you will need to have the column that you can use as a filter. Try our mentoring services to get one of our experts to help with this.
Is the performance better in DAX or SQL for concatenation?
A: The difference is miniscule. It depends on where Power BI is installed and where SQL is installed. My rule is, do as much in SQL as you can, so the reports are easier for users.
If you changed the name of the calculated column TemperatureKey to TempDegreesKey you made -- would all the calcs still work?
A: Yes, Power BI is great at auto updating items when they are renamed.