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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
v-kongfanf-msft
Community Support
Community Support

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.