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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Prima_
Resolver I
Resolver I

Doubt on filtering. It slows down the performance

Hi,

I have a main dashboard which displays weekly error and quality kpi's for countries . Have two other reports which computes two other kpi's. I want to display these two kpi's also in the main dashboard. So, I included these two datasets in the main dashboard. I want to show all these 4 kpi's in a visual. Filters are week and Country. If a select a week and country, the kpi's from the main dashboard are shown correctly but the kpi's from the other two datasets are not displayed correctly weekwise. It sums up for all weeks for the countries. I created a Country table with countries from all four kpi tables and a week table with weeks from all four kpi tables. And, have created a relationship of the Country field from the kpi tables to the Common Country table. Simillarly, have created a relationship of the week field from the kpi tables to the Common week table. I also created  a measure and included the filters 

%KPI3= CALCULATE( DIVIDE(SUM( ORDER[READY] ), [TotalOrder), FILTER (ALL('ORDER'),ORDER[week]= SELECTEDVALUE(MainData[Startclock Week]) && ORDER[Country] = SELECTEDVALUE(MainData[Country]))). Now, it shows all the data correctly but since the filter is used like this in few other computations, the performance is very slow. I believe, this is not needed and Power BI feature should be able to handle these cases automatically. Kindly assist. 
 
Thanks.
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @Prima_ ,

 

Maybe you can modify your formula like below:

SelectedWeekKPI3 = 
VAR SelectedWeek = SELECTEDVALUE(DateTable[Week])
VAR SelectedCountry = SELECTEDVALUE(CountryTable[Country])
RETURN
    CALCULATE(
        SUM(KPI3[KPI3_Value]),
        KPI3[Week] = SelectedWeek,
        KPI3[Country] = SelectedCountry
    )

vkongfanfmsft_0-1718331345414.png

 

 

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.

View solution in original post

Yes, it helped to improve the performance. Thank you.

View solution in original post

3 REPLIES 3
Prima_
Resolver I
Resolver I

Will try. Thanks

Anonymous
Not applicable

Hi @Prima_ ,

 

Maybe you can modify your formula like below:

SelectedWeekKPI3 = 
VAR SelectedWeek = SELECTEDVALUE(DateTable[Week])
VAR SelectedCountry = SELECTEDVALUE(CountryTable[Country])
RETURN
    CALCULATE(
        SUM(KPI3[KPI3_Value]),
        KPI3[Week] = SelectedWeek,
        KPI3[Country] = SelectedCountry
    )

vkongfanfmsft_0-1718331345414.png

 

 

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.

Yes, it helped to improve the performance. Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.