From the course: Advanced Power BI: DAX Language, Formulas, and Calculations

Unlock the full course today

Join today to access over 24,400 courses taught by industry experts.

Solution: Crop modeling

Solution: Crop modeling

(upbeat music) - [Instructor] In Power BI Desktop, let's take a look at the crop data table first in the data view. Notice that while there are crop categories in the commodity column, these categories or the commodities are further broken down into items, the data items, as subsets of these commodities. So we'll need to aggregate the totals based on the commodity name and not the more detailed data item label. We want to first think about filtering our data then calculating the total over that filtered data table. Let's first add the commodity to a table visual. Next, let's create a new DAX measure for the total volume of crops produced in 2015. Let's add it to a new table. Call this calculations. We'll then set up this formula using the calculate DAX function so that we can sum up the volume field from the data table as our aggregate. Next, we want to think about the filters in the second parameter of the calculate…

Contents