Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
I have two measures "Start Month" and "End Month" in two cards. Below is the formula for these measures.
I have added two individual slicers by Month. Is it possible to calculate the percentage change of these two filtered measures, so that the formula will update depending on which month is selected from each?
The table that is being filtered is titled "Date" filtered by column "Month".
what does the _change represent in the divide calculation? I receive the below error.
@Nick221_ - It's a variable (VAR) that stores a value. A.K.A we compute the difference or change between the start month & end month, store it and use it later in the DIVIDE.
There are two issues with the code now:
1) You have not kept the name of the measure, you have started with my variable
2) I did not notice that you have a space in [End Month], but no space in [StartMonth] so the syntax error is also because this measure cannot find the [EndMonth] measure (it's actually called [End Month]).
This shoudl fix your issue:
Pct Change =
VAR _change = [End Month] - [StartMonth]
RETURN
DIVIDE( _change, [StartMonth] )
Here's some more info: Variables are used in DAX to help with optimisation by storing values so that they do not need to be computed later in the calculation and to help with readability. In actual fact the most optimal version of the code I have given you is:
Pct Change =
VAR _start = [StartMonth]
VAR _change = [End Month] - _start
RETURN
DIVIDE( _change, _start )
This means that [Start Month] is only calculated once and stored, whereas in my earlier version it was calculated twice. I think this 2nd version is less readable however, and the difference it will make to the performance will be negligable.
You could write this calculation without variables (VAR) but this would be harder to read and understand at a glance:
Pct Change =
DIVIDE( [End Month] - [StartMonth] , [StartMonth] )
I hope this now works, and provides some information on variables within DAX. If this has solved your issue, please accept it as the solution, so others with the same challenge can find the information.
Hi @Nick221_
This is a syntax error, you need to give the measure a name.
For example,
Measure =
VAR _change = [EndMonth] - [StartMonth]
RETURN
DIVIDE( _change, [StartMonth] )
The _change is a variable to store the value of the [EndMonth] - [StartMonth].
Hope this can help.
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Nick221_ - try this:
VAR _change = [EndMonth] - [StartMonth]
RETURN
DIVIDE( _change, [StartMonth] )
If this works, please mark it as he solution for others with the same challenge.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 18 | |
| 11 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 26 | |
| 21 | |
| 13 | |
| 12 |