DAX, SQL and R…grouping and summarizing data.

Peter Hui
CodeX
Published in
3 min readFeb 25, 2022

--

With examples of course!

Photo by Nathan Dumlao on Unsplash

Everyone has to summarize data at some point. Here is how to do it in Power BI’s DAX, SQL and R.

This is a simple data set I have with 3 columns.

It’s basically the price for natural gas from 1997 to 2022.

Let’s say I want to know the Average, Min, Max and a difference column of Max —…

--

--

Peter Hui
CodeX
Writer for

I write about Power BI, Power Automate and other cool Microsoft power tools. Microsoft certified data analyst. Constant learner and an aspiring writer. 👍