Forum Discussion
Need help getting a percentage change working
Hi all,
I have created a dax measure to calculate a total home number - thats fine.
However when tryign to calculate a percentage change over two quaters the dax measure keept returnign the total home count and not the numbers for each quater. What is wrong with my percentage measure?
--my total home measure below
Hi PowerBIBunny,
You are returning the previous quarter value, not the percentage change. That is why the measure keeps showing the home count instead of the change percentage. You should return the difference variable instead. Then format the measure as Percentage in Power BI.
Percentage Change Homes = VAR PreviousHomes = CALCULATE( [number of homes], 'Quarterly Data - ALL LA'[Quarter & Year] = "Q1 2026" ) VAR CurrentHomes = CALCULATE( [number of homes], 'Quarterly Data - ALL LA'[Quarter & Year] = "Q2 2026" ) VAR Difference = DIVIDE(CurrentHomes - PreviousHomes, PreviousHomes) RETURN Differenceπ‘ Helpful? Give a Kudos π β keep the community growing
β Solved your issue? Mark as Solution βοΈ β help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics EngineerI think the first issue is simple β in your measure you are calculating diff but in the end doing: return previous
So naturally it will always return home count for previous quarter, not percentage.
Should be:
RETURN difference
Also one more thing, your "number of homes" measure is using Quality Data table but quarter filter is coming from Quarterly Data - ALL LA table.
Just check if both tables are related properly. If relationship is missing / inactive, then Q1 and Q2 both may return same total.
try this :
Percentage Change Homes =
VAR previous =
CALCULATE(
[number of homes],
'Quarterly Data - ALL LA'[Quarter & Year] = "Q1 2026"
)VAR _current =
CALCULATE(
[number of homes],
'Quarterly Data - ALL LA'[Quarter & Year] = "Q2 2026"
)VAR difference =
DIVIDE(_current - previous, previous)RETURN
differenceHelpful? Give a Kudos πSolved? Mark as Solution βοΈβ Azad Singh Thakur | Power BI Developer
5 Replies
- Rupa01
Solution Sage
Hi PowerBIBunny,
You are returning the previous quarter value, not the percentage change. That is why the measure keeps showing the home count instead of the change percentage. You should return the difference variable instead. Then format the measure as Percentage in Power BI.
Percentage Change Homes = VAR PreviousHomes = CALCULATE( [number of homes], 'Quarterly Data - ALL LA'[Quarter & Year] = "Q1 2026" ) VAR CurrentHomes = CALCULATE( [number of homes], 'Quarterly Data - ALL LA'[Quarter & Year] = "Q2 2026" ) VAR Difference = DIVIDE(CurrentHomes - PreviousHomes, PreviousHomes) RETURN Differenceπ‘ Helpful? Give a Kudos π β keep the community growing
β Solved your issue? Mark as Solution βοΈ β help others find it faster
Best regards,
Rupasree Achari | BI & Fabric Analytics Engineer - Azadsingh
Resolver II
I think the first issue is simple β in your measure you are calculating diff but in the end doing: return previous
So naturally it will always return home count for previous quarter, not percentage.
Should be:
RETURN difference
Also one more thing, your "number of homes" measure is using Quality Data table but quarter filter is coming from Quarterly Data - ALL LA table.
Just check if both tables are related properly. If relationship is missing / inactive, then Q1 and Q2 both may return same total.
try this :
Percentage Change Homes =
VAR previous =
CALCULATE(
[number of homes],
'Quarterly Data - ALL LA'[Quarter & Year] = "Q1 2026"
)VAR _current =
CALCULATE(
[number of homes],
'Quarterly Data - ALL LA'[Quarter & Year] = "Q2 2026"
)VAR difference =
DIVIDE(_current - previous, previous)RETURN
differenceHelpful? Give a Kudos πSolved? Mark as Solution βοΈβ Azad Singh Thakur | Power BI Developer - v-achippa
Community Support
Hi PowerBIBunny,
Thank you for reaching out to Microsoft Fabric Community.
Thank you Rupa01 and Azadsingh for the prompt response.
As we havenβt heard back from you, we wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
- v-achippa
Community Support
Hi @PowerBIBunny,
We wanted to kindly follow up to check if the solution provided by the user's for the issue worked? or let us know if you need any further assistance.
Thanks and regards,
Anjan Kumar Chippa
- Selva-Salimi
Solution Sage
Hi PowerBIBunny ,
you can rewrite your measure as follows:
Percentage Change Homes =var previous = CALCULATE([number of homes],filter('Quarterly Data - ALL LA','Quarterly Data - ALL LA'[Quarter & Year] = "Q1 2026"))var _current = CALCULATE([number of homes],filter('Quarterly Data - ALL LA','Quarterly Data - ALL LA'[Quarter & Year]= "Q2 2026"))Var difference = (_current - previous)/previousRETURNdifferenceif it still doesnt work could you please share if there is any slicer on your report and also the relationships between tables?
If this post helps, then I would appreciate a thumbs up π and mark it as the solution βοΈ to help the other members find it more quickly.