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
pcowman1
Helper I
Helper I

Measure Y over Y some not working

I'm having a problem with the Year Over Year Quick Measure where it won't show the difference where zeros are involved. Has anyone else had this issue?

 

 

Year Over Year.PNG

 

1 ACCEPTED SOLUTION

Hi @pcowman1 ,

I think this should be related to time intelligence function, it calculated based on the corresponding calendar. So if it does not contain specific date range records, Dax formula based on time intelligence functions also not calculate on these missed ranges.

I'd like to suggest you use date function to manually define the date range to calculate on a specific date range.

Time Intelligence "The Hard Way" (TITHW)  

BTW, you can also take a look at Dax auto-exist filter:

Understanding DAX Auto-Exist 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
aswin_k
Frequent Visitor

Hi @pcowman1,

Are you using Blank() function in your meaure? If so avoid that, so the measure returns Zero.
Regards
Aswin 

I'm using the standard Quick Measure:

 

Amount (LCY) YoY% =
IF(
    ISFILTERED('Customer Summary'[Posting 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_YEAR =
        CALCULATE(
            SUM('Customer Summary'[Amount (LCY)]),
            DATEADD('Customer Summary'[Posting Date].[Date], -1, YEAR)
        )
    RETURN
        DIVIDE(SUM('Customer Summary'[Amount (LCY)]) - __PREV_YEAR, __PREV_YEAR)
)

Hi @pcowman1 ,

I think this should be related to time intelligence function, it calculated based on the corresponding calendar. So if it does not contain specific date range records, Dax formula based on time intelligence functions also not calculate on these missed ranges.

I'd like to suggest you use date function to manually define the date range to calculate on a specific date range.

Time Intelligence "The Hard Way" (TITHW)  

BTW, you can also take a look at Dax auto-exist filter:

Understanding DAX Auto-Exist 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

Add 0 in your formula. In case you just want to remove blank

 

YOY% = {} + 0

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.