DAX Function

CALCULATE Power BI DAX exercises.

These concepts all use CALCULATE. Work through related PBIX exercises, compare the patterns, and submit numeric answers to save your progress.

View all DAX functions

26Related concepts

Concepts Using CALCULATE

Advanced Filtering with DAX: Using FILTER for Context Modification

Understand and apply the DAX FILTER function to create virtual tables and modify filter context dynamically within measures, enabling complex aggregations based on related table conditions.

IntermediateSUMXCALCULATEALL

Applying and Overriding Context Transition in Calculated Columns

Learn to create calculated columns that leverage implicit context transition for row-specific calculations and columns that override context to calculate global totals.

Applying Filters to Measures Using CALCULATE in DAX

Create robust measures using CALCULATE to apply various filters and calculate conditional aggregations, such as percentages based on venue status, show cancellations, and ticket sales.

Calculate Film Comfort Breaks using EARLIER

To calculate the required number of comfort breaks for each film based on its running time, by referencing a non-joined comfort breaks table using the EARLIER function to manage row context.

Calculating Cumulative Year-to-Date Purchases, Previous Month's Purchases, and Their Ratio using Date Intelligence Functions

Learn to apply DAX date intelligence functions like TOTALYTD, DATESYTD, and PARALLELPERIOD in conjunction with CALCULATE to perform time-based calculations and derive insightful ratios.

Calculating Percentage of Year Total Using ALLEXCEPT in Power BI DAX

Learn how to use the ALLEXCEPT function in DAX to dynamically remove all filters from a table except for specified columns, enabling calculations like percentage of year total within a filtered context.

Calculating Quarter-to-Date (QTD) and Previous Quarter Sales

Learn to calculate Quarter-to-Date (QTD) sales and sales for the immediately preceding quarter using Power BI's time intelligence functions.

Calculating Ratios with CALCULATE and ALL in Premier League Data

Learn to calculate different types of ratios and proportions by dynamically modifying filter contexts using the CALCULATE and ALL DAX functions, applying these concepts to Premier League results data.

Conditional Data Omission in Matrix Visuals using CALCULATE, VALUES, and FILTER

Learn to create DAX measures that conditionally omit specific data categories (like environments) from calculations in a matrix visual, leveraging the CALCULATE, VALUES, and FILTER functions to manipulate filter context.

Context Transition with CALCULATE: Overriding Filters for Comparative Analysis

Learn to use the CALCULATE function to override existing filter contexts, enabling comparative analysis of metrics against a fixed baseline (e.g., comparing country-specific values to a national standard).

Controlling Filter Context with CALCULATE and KEEPFILTERS in DAX

Learn how to use CALCULATE and KEEPFILTERS to precisely control filter context within measures, ensuring calculations apply to specific data subsets while respecting or overriding existing filters.

BeginnerCALCULATE

DAX CALCULATE Function: Applying Filters to Measures

Learn to use the CALCULATE function in DAX to apply single and multiple filters to measures, including combining filter conditions with logical OR (||).

DAX Exercise: Calculate Sales Ratio for Multi-Legged Animals using Variables and CALCULATE

Create a DAX measure using variables and CALCULATE to determine the ratio of sales for the current filter context to the sales of 4-legged and 6-legged animals combined within that same context, handling potential division by zero.

Leveraging USERELATIONSHIP for Multiple Inactive Date Relationships

To learn how to use the USERELATIONSHIP function to activate inactive relationships in DAX, allowing for flexible date-based calculations on a single date dimension.

IntermediateCALCULATE

Mastering CALCULATE: Applying Filters to DAX Expressions

Understand and apply the CALCULATE function to modify filter context within DAX measures, enabling calculations based on specific filter conditions.

Mastering Filter Context Modification with REMOVEFILTERS in DAX

Learn to effectively use the REMOVEFILTERS function within CALCULATE to modify or completely clear filter context for measures, enabling robust comparative analysis and consistent visual displays in Power BI.

Mastering Filter Context Removal with CALCULATE and ALL in DAX

Understand and apply the CALCULATE function to modify and remove filter contexts using ALL, thereby calculating contributions relative to different total scopes.

Mastering Filter Context with REMOVEFILTERS in DAX

Understand and apply the REMOVEFILTERS function within CALCULATE to manipulate filter context, enabling calculations that ignore specific filters or all filters.

Mastering Filter Context: Using ALLSELECTED for Dynamic Percentages

Understand and apply the ALLSELECTED function to calculate percentages within a visual, ignoring internal visual filters but respecting external slicers.

Mastering KEEPFILTERS with CALCULATE for Dynamic Context Modification

Understand and apply the KEEPFILTERS function within CALCULATE to precisely control filter context for inclusion and exclusion scenarios, and to define conditional logic in Power BI visuals.

Mastering Power BI Time Intelligence: Automatic Date Tables and DAX Functions

Learn to leverage Power BI's automatic date tables to create robust time intelligence measures using DAX functions like TOTALMTD, SAMEPERIODLASTYEAR, DATEADD, and ISINSCOPE for calculating running totals and period-over-period comparisons.

Modifying Filter Context with DAX CALCULATE in Power BI

Understand and apply the DAX CALCULATE function to modify or replace existing filter contexts within Power BI visuals, using various filter conditions including logical operators and string functions.

Optimizing DAX Formulas with Variables: Calculating Corrected Unsold Ticket Percentage

Learn to use DAX variables to break down complex calculations into logical, readable steps, specifically for calculating a corrected percentage of unsold tickets per artist.

Optimizing DAX Measures with Variables for Readability and Performance

Learn to use DAX variables to break down complex formulas into logical, readable steps, improving both maintainability and understanding of measures.

Utilizing Disconnected Slicers for Dynamic Measure Calculations

Learn how to use a disconnected slicer to dynamically influence measure calculations without directly filtering the main data model, and how to apply this to visual titles and conditional formatting.