Power BI
DAX Cookbook
3min
Here follows a few useful DAX statements that can be handy to use in your Power BI model.
To get last year's values you can use the SAMEPERIODLASTYEAR DAX function.
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
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.
Updated 15 Jan 2024
Did this page help you?