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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I need to create a visual showing percentage difference of number of companies in different industries in three months period e.i. june/july/august.
But it only shows me two months not three.
I'm usuing this formula.
Solved! Go to Solution.
Hi @SofiaK - Check, your data source contains records for all three months, especially for August. If any month is missing, Power BI might only calculate the difference for the two available months.
slightly you can modify your DAX formula to calculate the three-month trend by specifying the range directly or by creating measures for each of the three months.
Percentage Difference =
VAR CurrentMonthCompanies = [Total Companies]
VAR PreviousMonthCompanies =
CALCULATE(
[Total Companies],
DATEADD('Sheet1 (2)'[Date], -1, MONTH)
)
VAR PreviousTwoMonthsCompanies =
CALCULATE(
[Total Companies],
DATEADD('Sheet1 (2)'[Date], -2, MONTH)
)
RETURN
IF(
NOT(ISBLANK(PreviousMonthCompanies)) && NOT(ISBLANK(PreviousTwoMonthsCompanies)),
DIVIDE(CurrentMonthCompanies - PreviousMonthCompanies - PreviousTwoMonthsCompanies, PreviousMonthCompanies + PreviousTwoMonthsCompanies, 0) * 100,
BLANK()
)
dont forget to to have a Date dimension table, consider creating one. This allows for more accurate date-based calculations and lets you set up a continuous timeline across months.
Hope this works.
Proud to be a Super User! | |
Hi @SofiaK - Check, your data source contains records for all three months, especially for August. If any month is missing, Power BI might only calculate the difference for the two available months.
slightly you can modify your DAX formula to calculate the three-month trend by specifying the range directly or by creating measures for each of the three months.
Percentage Difference =
VAR CurrentMonthCompanies = [Total Companies]
VAR PreviousMonthCompanies =
CALCULATE(
[Total Companies],
DATEADD('Sheet1 (2)'[Date], -1, MONTH)
)
VAR PreviousTwoMonthsCompanies =
CALCULATE(
[Total Companies],
DATEADD('Sheet1 (2)'[Date], -2, MONTH)
)
RETURN
IF(
NOT(ISBLANK(PreviousMonthCompanies)) && NOT(ISBLANK(PreviousTwoMonthsCompanies)),
DIVIDE(CurrentMonthCompanies - PreviousMonthCompanies - PreviousTwoMonthsCompanies, PreviousMonthCompanies + PreviousTwoMonthsCompanies, 0) * 100,
BLANK()
)
dont forget to to have a Date dimension table, consider creating one. This allows for more accurate date-based calculations and lets you set up a continuous timeline across months.
Hope this works.
Proud to be a Super User! | |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |