Power BI

DAX Cookbook

3min

Here follows a few useful DAX statements that can be handy to use in your Power BI model.

Last year values

To get last year's values you can use the SAMEPERIODLASTYEAR DAX function.

Text


If you have a slicer on the page filtering the values for a specific year, you need to disable or remove this filter for the measure to be able to get last year values



Text




Remove specific filters

If you have a page with a set of slicers filtering the context, you might anyhow want to show a total number independent of your slicer filters. You can use the DAX function REMOVEFILTERS to remove specific filters from a calculated measure.

Text