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
Anonymous
Not applicable

YOY Quick Measure

Hi I have used the followimg quick YOY measure. All works well. However, for my current year I dont have data for all the months yet. My report now shows a 100% YoY negative growth. How do I fix this to not show this?

 

Sales_Retail YoY% =
IF(
    ISFILTERED('BI_Category'[Period_From_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('BI_Category'[Sales_Retail]);
            DATEADD('BI_Category'[Period_From_Date].[Date]; -1; YEAR)
        )
    RETURN
        DIVIDE(SUM('BI_Category'[Sales_Retail]) - __PREV_YEAR; __PREV_YEAR)
)
 
Any help please.
1 ACCEPTED SOLUTION
ibarrau
Super User
Super User

Hi. I usually don't recommend quick measures because you don't write the idea you want. Anyway, I think this might be because AutoDateTime time intelligense option in power bi will create a table which the last date is 31/12/ActualYear. I'm talking about this: 'BI_Category'[Period_From_Date].[Date]

If you create your own Calendar Date Table you can control it to have data untill today. Relate it to your table and use the Date Column of the calendar table in that formula. You can check how to create a table like this in here.

 

Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

View solution in original post

1 REPLY 1
ibarrau
Super User
Super User

Hi. I usually don't recommend quick measures because you don't write the idea you want. Anyway, I think this might be because AutoDateTime time intelligense option in power bi will create a table which the last date is 31/12/ActualYear. I'm talking about this: 'BI_Category'[Period_From_Date].[Date]

If you create your own Calendar Date Table you can control it to have data untill today. Relate it to your table and use the Date Column of the calendar table in that formula. You can check how to create a table like this in here.

 

Regards,

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Happy to help!

LaDataWeb Blog

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.

Top Solution Authors