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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
wnicholl
Resolver II
Resolver II

Measure not returning any values.

Hello,

 

I could use some help with creating a vitrual relationship between account and policy tables. I need to know how many accounts with policys have either "Active", "Expired", and "Blank".  This is the formula I wrote doesn't return any errors but it's also not returning any values.  Am I missing something in the formula?  Thanks in advance for any insights. 

 

# of Non-Insureds 2 = CALCULATE(TREATAS(VALUES(Policy[Account__c]), Account[Id]), FILTER(Policy, Policy[Policy_Type__c] = "Active" && "Expired" && ""))
1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

I think you are missing the expression, you want to do

 

CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])

 

try this..

 

 # of Non-Insureds 2 = 
   CALCULATE ( 
      -- you are missing this. Change to the calculation of your interest 
      SUM ( Account[Amount] ), 
      TREATAS( VALUES(Policy[Account__c]), Account[Id]),

      -- you want to check one of the values I believe 
       FILTER(Policy, Policy[Policy_Type__c] in {"Active", "Expired", ""} ) 
    ) 

 

 

Calculation can be sum, counta, countrows based on your needs!, Thanks

 

View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

I think you are missing the expression, you want to do

 

CALCULATE(<expression>[, <filter1> [, <filter2> [, …]]])

 

try this..

 

 # of Non-Insureds 2 = 
   CALCULATE ( 
      -- you are missing this. Change to the calculation of your interest 
      SUM ( Account[Amount] ), 
      TREATAS( VALUES(Policy[Account__c]), Account[Id]),

      -- you want to check one of the values I believe 
       FILTER(Policy, Policy[Policy_Type__c] in {"Active", "Expired", ""} ) 
    ) 

 

 

Calculation can be sum, counta, countrows based on your needs!, Thanks

 

Got it... Thanks for your help! Works great.

Glad to hear that it worked 🙂 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors