Texting Formulae and Context for Accuracy

Got a question on context. What are the best practices for “checking” a DAX formula to ensure that one has gotten the context correct (before sending an analysis or report off to, say, one’s boss…)

There’s a lot of time given to context in EDNA’s training, as there should be. While learning the basics of PQ and PP elsewhere, there was a fair amount of attention given to “checking” one’s formula or query. If that type of guidance is in the classes here @ EDNA, I seem to have missed it or haven’t gotten there yet.

Thanks in advance.

*** READ FIRST ***

Before you send your question.
Make sure that all details relevant to your question is complete:

  • Your current work-in-progress PBIX file - VERY IMPORTANT
  • A clear explanation of the problem you are experiencing
  • A mockup of the results you want to achieve
  • Your underlying data file

Check out this thread on Tools and Techniques for Providing PBIX Files with Your Forum Questions
Also make sure that your data file contains no confidential information. If it does, click the link above.

*** DELETE THIS MESSAGE IF YOU ARE SURE ALL YOUR DETAILS ARE COMPLETE OR IF THE ABOVE INFORMATION IS NOT APPLICABLE TO YOUR QUESTION.***

This would also be of help as well

DAX basics in Power BI Desktop - Power BI | Microsoft Docs

@bgillaspey1 ,

Great question. I think it is addressed at scattered points throughout the coursework, but I don’t recall major focused discussion on this topic.

I know a lot of folk like @Greg double-check their results in SQL. Another common approach is to use the Analyze in Excel external tool.

The pivot grid functionality within Tabular Editor 3 is another useful tool for checking results:

https://docs.tabulareditor.com/onboarding/refresh-preview-query.html

Finally, what I often do is create a small test dataset that is large enough to be representative of the full dataset, but small enough to be easy to confirm results. With this small dataset, I often use the filter functions within the Power BI data view to simulate what the DAX should be doing and confirm that I’m getting the same results.

I hope this is helpful.

  • Brian
3 Likes

@bgillaspey1 Since theory is the most important part of DAX, you can’t really just mix and match functions and follow best practices to get the correct result because of the subtle concepts and their side effects. In DAX you need to know what you are going to do beforehand, there needs to be a strategy regarding DAX concepts you need to touch etc.

1 Like

Hi @bgillaspey1, did the response provided above help you solve your query? If not, how far did you get and what kind of help you need further? If yes, kindly mark as solution the answer that solved your query. Thanks!

Hello @bgillaspey1, due to inactivity, a response on this post has been tagged as “Solution”. If you have a follow question or concern related to this topic, please remove the Solution tag first by clicking the three dots beside Reply and then untick the check box.

We request you to kindly take time to answer the Enterprise DNA Forum User Experience Survey,We hope you’ll give your insights on how we can further improve the Support forum. Thanks!

Thanks for your insight from the instructor’s view.

I’d just suggest making that (Check your calculations and reports !!) something that is emphasized: no one’s career will be enhanced by incorrect reports and calculations. That’s still the reality out there in the corporate world.