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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
24601
Frequent Visitor

Long Term Measure Suddenly Not Working

Hi,

My organization has been using a measure for years without any problem and in the last 4 days there have been issues. 

The measure is a simple count rows of a sales fact table, filtered by a date. USERELATIONSHIP is required to activate the relationship between the fact table and the date table, date & date sold. I noticed that the measure gives incorrect values when I add another measure calculation items sold filtered for specific product. It is possible that other measures also produce and incorrect value. There is only one relationship from the product table and that is to the sales fact table. 

The image shows a breakdown by year. 
Error Sold - Is the broken measure due to the Specific Product
Actual Sold - Is the correct volume of items sold
Actual Purchased - Is a measure similar to sold but uses date purchased as the date relationship. This measure does not break with the inclusion of the Specfic Product measure. 
Specific Product - Calculates items sold for the specific product. 

 

24601_1-1715096156704.png

The Error Sold measure still produces the correct total value but as per above the year on year numbers are not matching. 

Measure for Error Sold:

CALCULATE (
    COUNTROWS ( Sales),
    USERELATIONSHIP ( 'Calendar'[Date], Sales[Date Sold] ),
    FILTER ( Sales, [Date Sold] >= Date ( 2018, 1, 1 ) )
)


As said, this has worked for years and suddendly it is not. I don't know whether there is an issue with the measure or formatting of the measure. There are lots of measures that filter by date and I would not like to have to change them all. 

Any help or advice on what might be the issue here would be massively appreacited. 

Thank you. 

2 REPLIES 2
Anonymous
Not applicable

Hi  @24601 ,

 

In your description it is mentioned that: when adding another Sales Volume Value Calculation item for a specific product filter, the metric gives incorrect values. It is possible that this screening context is causing the error.

Measure_ =
CALCULATE (
    COUNTROWS ( Sales ),
    USERELATIONSHIP ( 'Calendar'[Date], Sales[Date Sold] ),
    FILTER (
        ALLEXCEPT ( Sales, Sales[project] ),
        [Date Sold] >= DATE ( 2018, 1, 1 )
    )
)

 

Best Regards,
Adamk Kong

 

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

24601
Frequent Visitor

Futher to the above:

The measure has stopped working in dataset that have been frozen since the end of 2021 and 2022 so no refreshes have taken place or changes made to those datasets since they were frozen. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.