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
Mattwilson1981
Frequent Visitor

Simple measure causes report to timeout

I have two tables that I need to use in this measure

 - Invoice Fees: Stores all invoiced activities

 - Reasons: Stores any codes entered against an activity to explain why an activity may have been completed late.  An activity can have many reasons.

 

If an activity is recorded as being late, there will be some instances where the late flag will still be shown as False/No.  In this example a U reason assigned against an activity will mean that it is not classed as late.

 

To start I created a measure in Invoice Fees to return the count of U codes for the activity where the activity was late.

Late With U Code = CALCULATE(COUNT(Reasons[LedgerLineId]),FILTER(Reasons,Reasons[Reason Letter]="U"),FILTER('Invoice Fees','Invoice Fees'[Late] = 1))

This measure works and returns the count but now results in the report refresh taking a long time.

 

If I create a new measure to look at this or even just wrap this in an if statement like this

Late With U Code = If(CALCULATE(COUNT(Reasons[LedgerLineId]),FILTER(Reasons,Reasons[Reason Letter]="U"),FILTER('Invoice Fees','Invoice Fees'[Late] = 1))>0,"No","Yes")
Then the report will just timeout refreshing
 
This would seem like it's something really simple as I have written much more complicated measures and not had this problem.  Can anyone offer any help?

 

 

1 REPLY 1
v-yuta-msft
Community Support
Community Support

Hi Mattwilson1981,

 

The slow performance may caused by there're two filters in your measure which means two table scanning operations. Any relationship between 'Invoice Fees' and 'Reasons'? If there's relationship between the two table, I would suggest you to merge the two tables and then use only one filter in your measure. 

 

Regards,

Jimmy Tao

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.