Forum Discussion
Power BI Percentage Growth
I have created a matrix visual where calcuating the % Growth Month over Month change. I have sorted the months in FInacial Year format and getting percentage value as 0 when taking the Month sorted field in the matrix.
14 Replies
- grazitti_sapna
Super User
Hi arjun0028,
when Month is sorted using another column (like Financial Month Index) but the MoM DAX calculation uses the visible month column instead of the true date context. As a result, Power BI cannot correctly detect the previous month, so the calculation returns 0%.
You should include date column in your Growth % column, Refer below example DAX
MoM Growth % =
VAR CurrentValue =
[Course Enrollments]VAR PreviousMonth =
CALCULATE(
[Course Enrollments],
DATEADD('Date'[Date], -1, MONTH)
)RETURN
DIVIDE(CurrentValue - PreviousMonth, PreviousMonth)🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together!- grazitti_sapna
Super User
- cengizhanarslan
Super User
Step 1) Use a proper calendar table
Mark it as Date Table in the model.
Step 2) Use the Date column in the time calculation
Example MoM growth measure:
MoM Growth % = VAR CurrentValue = SUM ( 'FactTable'[Value] ) VAR PreviousValue = CALCULATE ( SUM ( 'FactTable'[Value] ), DATEADD ( 'Calendar'[Date], -1, MONTH ) ) RETURN DIVIDE ( CurrentValue - PreviousValue, PreviousValue )Step 3) Use Month label only for display
In the matrix you can use something like:
- Rows → Branch
- Columns → Calendar[Fiscal Month Name]
- Sort that column by → Calendar[Fiscal Month Number]
Step 4) Check the relationship
Ensure that "Calendar[Date] → FactTable[Date]" is the active relationship.
- arjun0028Regular Visitor
Adjust this code
% Growth Enrolment MOM =IF(ISFILTERED('Booking Live Data'[BC_Date]),ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),VAR __PREV_MONTH =CALCULATE(SUM('Booking Live Data'[Enrol_Count]),DATEADD('Booking Live Data'[BC_Date].[Date], -1, MONTH))RETURNDIVIDE(SUM('Booking Live Data'[Enrol_Count]) - __PREV_MONTH, __PREV_MONTH))- arjun0028Regular Visitor
The other measures get affected despite using this method this method is not the effective method
- arjun0028Regular Visitor
Hi I followed this method not getting percentage as 0 but a constant 0.01 percentage please help me out
- AnonymousNot applicable
Hi arjun0028,
Thank you for reaching out to the Microsoft Fabric Forum Community, and special thanks to grazitti_sapna and cengizhanarslan for prompt and helpful responses.
The issue usually happens when the time intelligence calculation is using the date column from the fact table instead of a proper calendar table, especially when the visual is grouped by a sorted month field. Functions like DATEADD work correctly only with a continuous date column from a dedicated Date/Calendar table. I would recommend creating or using a Calendar table, marking it as a Date table, and creating an active relationship between Calendar[Date] and 'Booking Live Data'[BC_Date]. Then update the MoM calculation to use Calendar[Date] inside DATEADD and use the month name from the Calendar table in the matrix. This usually resolves issues where the MoM growth shows 0 or constant values.
Thanks & Regards,
Prasanna Kumar
- arjun0028Regular Visitor
Is there any other alternative method because the calendar method has not worked out properly despite trying it out
- grazitti_sapna
Super User
Hi arjun0028,
I've already shared an .pbix file working example, you can add those columns to your existing table and try using it
- AnonymousNot applicable
Hi arjun0028,
Have you tried the suggestion provided by grazitti_sapna? Alternatively, you may also try calculating the previous month using a Year–Month column (e.g., YYYYMM) instead of relying on time intelligence functions like DATEADD, especially if the calendar table approach did not work as expected.
Thanks & Regards,
Prasanna Kumar
- arjun0028Regular Visitor
I have tried out their methods which they had shared @grazitti_sapna and @cengizhanarslan.
Pls try to contact me @grazitti_sapna and @cengizhanarslan to explain you the issue.
- AnonymousNot applicable
Hi arjun0028,
If the issue still persists, we kindly request you to share the sample data in a workable format such as text, an Excel file, or a PBIX file with sample data instead of screenshots. Additionally, please include the expected output. This will enable us to assist you more effectively.
Regards,
Prasanna Kumar- arjun0028Regular Visitor
Ok will do it.
- v-echaithra
Community Support
Hi arjun0028 ,
Just checking in to see if you had a chance to share the model or sample file which will help us assist you more effectively.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Thank you.