Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ScarlettBebb
Frequent Visitor

Previous Month showing blank (percent difference calculation)

Hello all,

 

I was wondering if anyone could help with this error? I have a table as follows

 

ScarlettBebb_1-1666271584626.png

 

From this I created a series of measures like this 

 

Average FPA = AVERAGE('Product FPA'[FPA])
Prior Month FPA = CALCULATE([Average FPA], PREVIOUSMONTH('Product FPA'[Attribute].[Date]))
% Change = DIVIDE([Average FPA], [Prior Month FPA], blank())-1

 

 

Then I wanted to make a table visual to show me the %change of FPA month to month for each product. But the previous month shows as Blank (and I've tried changing data hierchy). See visual below. I think the % change doesn't work yet because of the previous month error. I don't know if this makes a difference but my Date is the 01st of every month from 2016 to 2022. 

 

ScarlettBebb_2-1666271796646.png

 

Any help would be really appreciated 

 

Thank you 

 

Scarlett

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

If you do not have DIM-calendar table, one of ways to achieve this is to create a measure like below.

I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1666273026125.png

 

 

Prior month value avg: =
CALCULATE (
    [Value avg:],
    'Table'[Attribute]
        = MAXX (
            FILTER (
                ALLSELECTED ( 'Table'[Attribute] ),
                'Table'[Attribute] < MAX ( 'Table'[Attribute] )
            ),
            'Table'[Attribute]
        )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

If you do not have DIM-calendar table, one of ways to achieve this is to create a measure like below.

I tried to create a sample pbix file like below, and I hope the below can provide some ideas on how to create a solution for your datamodel.

 

Jihwan_Kim_0-1666273026125.png

 

 

Prior month value avg: =
CALCULATE (
    [Value avg:],
    'Table'[Attribute]
        = MAXX (
            FILTER (
                ALLSELECTED ( 'Table'[Attribute] ),
                'Table'[Attribute] < MAX ( 'Table'[Attribute] )
            ),
            'Table'[Attribute]
        )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thank you so much! This worked perfectly 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.