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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sax
Helper I
Helper I

How to display % change at Year level only if all quarters present

Hi community,

I got a simple model with a fact table, a dimension table and a calendar

Sax_0-1686127788324.png

I'm trying to find a way to display % change at year level only if all 4 quarters are in:

 

Sax_1-1686128324985.png

Looking at the example, is there a way to make -43.9% disappear until I got all 4 quarters for 2023?

 

These are my measures (3rd and 4th column):

 

2. Last Year Q/Y sales =
VAR LYSales =
    CALCULATE ( [1. Total Sales], PREVIOUSYEAR ( 'Calendar'[Dates] ) )
VAR LYQSales =
    CALCULATE ( [1. Total Sales], SAMEPERIODLASTYEAR ( 'Calendar'[Dates] ) )
RETURN
    IF (
        ISINSCOPE ( 'Calendar'[Quarter/Year] ) || ISINSCOPE ( 'Calendar'[Quarters] ),
        LYQSales,
        LYSales
    )

 

2.1 LY QoQ/YoY % =
DIVIDE(
    [1. Total Sales]-[2. Last Year Q/Y sales],
    [2. Last Year Q/Y sales]
)

 

Many thanks!

 

Sax

2 REPLIES 2
amitchandak
Super User
Super User

@Sax , use offset and use isinscope to switch measure- I have added that example in video

Power BI Offset Compare Categories, Time Intelligence MOM, QOQ, and YOY: https://youtu.be/5YMlkDNGr0U

@amitchandak Thanks for your reply. Unfortunately, it is not answering my question.
I do not have an issue with referring to previous quarter/Year sales.  
What I'd like is at year level to display % changes only when I got data for the full year, hence all four quarters should be in. Failing that, I'd like a blank.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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