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

calculate sum using Inside and outside filters

Hello Community,

 

I need help to calculate the count of active policies by passing internal and external filters. My count should change on visual when I pass explicit filters. 

Explicit Filter is column from policy table. For example - Policy Stage (Active, Terminated), Filters values - Active, Terminated or both

 

Here is the calcuation - 

 

Total Policy Count = Auto Insurance + Property Insurance

Auto Insurance = Policy Running total in Date

 
Policy Running total in Date =
CALCULATE(
    SUM('Policy table'[policy Count]),
    FILTER(
        ALLSELECTED('Date table'[Date]),
        ISONORAFTER('Date table'[Date], MAX('Date Table'[Date]), DESC)
    )
Policy Count = 
CALCULATE(
    [Policies Issued] + [Reinstatements Count] - [Terminations Count],
    '[Product] = "Auto Insurance"   )

 

Here I want to interact filter where it should give me the count of policies Active or Terminated or both depending what user selects from explicit filter. Policy Status is column in Policy table. One filter is interacting well where user select what insurance count they want to see - Auto, Property or both

 

Right now, it is not giving me the expected count when I select Policy Status filters. Calculations are coming right only when I select 'All' Policy status filter

 

1 REPLY 1
v-zhangti
Community Support
Community Support

Hi, @swtgoyal 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.