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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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

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

v-kongfanf-msft
Community Support
Community Support

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 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors