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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Gondi63
Helper I
Helper I

ParallellPeriod and Single Selection Filter

I'd like to create a matrix with a Value for [Net Revenue] and [Net Revenue Prior Year].

 

I've created both measures and they seem to be calculating correctly:

multiyear.PNG

 

However, if I change the slicer to single select or select only a single year, I lose the Prior Year data:

 

singleyear.PNG

 

What's the best method to show both values when only single year is selected?

 

 

6 REPLIES 6
Gondi63
Helper I
Helper I

I marked the calendar table as a date table. 

 

Trying each of these two options, I get the same behavior. Correct calculations when all years are selected, but when I select an individual fiscal year, I get blanks in each of the "prior year" calculations.

 

ghaines
Resolver I
Resolver I

This could happen if your slicer is acting on the year in the fact table, instead of on the calendar.

 

If not, could you post the formula for "Net Revenue"?

Net Revenue = 
    SUMX(
        'Line Items',
        'Line Items'[Net Revenue]
    )

 

Confirming, the slicers/filters are set on fields from the Fiscal_Calendar DIM table.

Try changing to SUM('Line Items'[Net Revenue])
I don't think the formula you have there is typical.  I haven't used a formula quite like that.  typically it would be something like:

SUMX(
        VALUES('Line Items'[Product Types]),
        'Line Items'[Net Revenue]
    )

but that is for certain applications, not as a basic calculation.

 

SUMX calculates the second term for each individual value of the first term.  I'm speaking outside of my experience because I've never used sumx where the first term is an entire table, but I expect that the filter on date is providing a context first, which limits the rows of 'Line Items' that are used in the calculation of the second term.  So "Sum over the currently selected rows of 'Line Items'" has already excluded PY if that makes sense.

Thanks for the follow up --

 

I don't see any behavior change when swiching to SUM()

Net Revenue PY = 
    CALCULATE(
        SUM(
            'Cornerstone Line Items'[Net Revenue]
        ),
        PARALLELPERIOD('Fiscal Calendar'[Fiscal_Year_Date],-1,YEAR
        )
    )

 

amitchandak
Super User
Super User

@Gondi63 , Make sue the fiscal calendar is marked as a date table.

 

Also try measure like

 

Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Year))
Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),SAMEPERIODLASTYEAR('Date'[Date]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Users online (5,452)