Forum Discussion
"Visual has exceeded the available resources" - Measure optimization
Hello community,
i have an issue in 2 visuals where i use measures to count while user choose date within a date range slicer.
We use a Premium account / PowerBI workspace.
I am trying to find alternative ways to make these measures work the same way more efficiently.
1st scenario:
Column chart showing policies with premium decreases within a date range:
2nd scenario
Thanks in advance
Hi pezakas
Can you please try below codeVAR SelectedStartDate = MIN('DIM_CALENDAR_PARTNER'[Date]) VAR SelectedEndDate = MAX('DIM_CALENDAR_PARTNER'[Date]) RETURN CALCULATE( DISTINCTCOUNT(DIM_PARTNER[Partner_ID]), USERELATIONSHIP(DIM_CALENDAR_PARTNER[Date], DIM_PARTNER[Effective_date]), DIM_PARTNER[Effective_date] <= SelectedEndDate, DIM_PARTNER[ETL_deletion_flag] <> True, REL_POLICY_X_PARTNER[Role] = "Owner 1 - OW1", DIM_POLICY[Policy_status] IN {"Inforce", "Inforce - first year", "Renewal"}, FILTER( ALL(DIM_PARTNER), CALCULATE( MAX(DIM_PARTNER[Effective_date]), ALLEXCEPT(DIM_PARTNER, DIM_PARTNER[Partner_ID]), DIM_PARTNER[Effective_date] <= SelectedEndDate ) = DIM_PARTNER[Effective_date] ) )
If your requirement is solved, please make sure to MARK AS SOLUTION and help other users find the solution quickly. Please hit the LIKE button if this comment helps you.
Thanks
Pijush
2 Replies
- AnonymousNot applicable
Hi pezakas ,
Your measure doesn't seem particularly complex to compute, please consider starting with optimizing the semantic model.And you can refer to:how to fix visual has exceeded the available resource. - Microsoft Q&A
Hope it helps!
Best regards,
Community Support Team_ Scott ChangIf this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- PijushRoy
Community Champion
Hi pezakas
Can you please try below codeVAR SelectedStartDate = MIN('DIM_CALENDAR_PARTNER'[Date]) VAR SelectedEndDate = MAX('DIM_CALENDAR_PARTNER'[Date]) RETURN CALCULATE( DISTINCTCOUNT(DIM_PARTNER[Partner_ID]), USERELATIONSHIP(DIM_CALENDAR_PARTNER[Date], DIM_PARTNER[Effective_date]), DIM_PARTNER[Effective_date] <= SelectedEndDate, DIM_PARTNER[ETL_deletion_flag] <> True, REL_POLICY_X_PARTNER[Role] = "Owner 1 - OW1", DIM_POLICY[Policy_status] IN {"Inforce", "Inforce - first year", "Renewal"}, FILTER( ALL(DIM_PARTNER), CALCULATE( MAX(DIM_PARTNER[Effective_date]), ALLEXCEPT(DIM_PARTNER, DIM_PARTNER[Partner_ID]), DIM_PARTNER[Effective_date] <= SelectedEndDate ) = DIM_PARTNER[Effective_date] ) )
If your requirement is solved, please make sure to MARK AS SOLUTION and help other users find the solution quickly. Please hit the LIKE button if this comment helps you.
Thanks
Pijush