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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Measure Filtering issue

Hi Experts

 

Based on the sample data below. 

crm_call_nameDateday_name_shortweek_start_dateweek_end_datemonth_desc_shortactivity_type_1product_name_data_value
C02744964223-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744964423-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744974423-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02747542223-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744964523-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02747542323-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744964123-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744964023-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744974123-Nov-22Wed21-Nov-2227-Nov-22Novf2fApples1
C02744964623-Nov-22Wed21-Nov-2227-Nov-22Novf2fTrelegy1
C02747544324-Nov-22Thu21-Nov-2227-Nov-22Novf2fOranges1
C02744975124-Nov-22Thu21-Nov-2227-Nov-22Novf2fOranges1
 21-Nov-22Mon21-Nov-2227-Nov-22Novcustomer_facing_day 1
 23-Nov-22Wed21-Nov-2227-Nov-22Novcustomer_facing_day 1
 25-Nov-22Fri21-Nov-2227-Nov-22Novcustomer_facing_day 1
 22-Nov-22Tue21-Nov-2227-Nov-22Novcustomer_facing_day 1
 24-Nov-22Thu21-Nov-2227-Nov-22Novcustomer_facing_day 1
         

 

1. John has 5 cutsomer facing days 

Measure

Days # =
    CALCULATE(SUM(act_rates_activity_volume_and_cf_days[data_value]),
            act_rates_activity_volume_and_cf_days[activity_type_1] = "customer_facing_day")+0
 
2. John see 12 customer f2f so 12/5 = 2.4 as his customer rate
 
Second measure
f2f Customers = Calculate(DISTINCTCOUNT('act_rates_activity_volume_and_cf_days'[crm_call_name]),
                            FILTER(VALUES(act_rates_activity_volume_and_cf_days),
                            not(act_rates_activity_volume_and_cf_days[activity_type_2] IN {"customer_facing_day","item_or_sample_drop","blank_call_type","Outlook_email"})))
 
Third Measure 
 
Weekly Rates =
Var Day_Count= [Days #]
Var Activity_CT= [ActivityCountTest]

Return
    Divide(Activity_CT,Day_Count,0)
 
Works at higher level...
 
When i try and filter down to product level - ie oranges  - so in our sample data john sold oranges to 2 customers - so based on customer facing days - johns rate shoud be 2/5 =0.4.....


i cannot get that using my measure - i get back 0.....not sure what the lower level filtering issue is
 
1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could try this measure.

Weekly Rates = 
Var Day_Count= CALCULATE(SUM(act_rates_activity_volume_and_cf_days[data_value]),FILTER(ALL(act_rates_activity_volume_and_cf_days),
            act_rates_activity_volume_and_cf_days[activity_type_1] = "customer_facing_day"))
Var Activity_CT= CALCULATE(SUM(act_rates_activity_volume_and_cf_days[data_value]),
            act_rates_activity_volume_and_cf_days[activity_type_1] = "f2f")
Return
    Divide(Activity_CT,Day_Count,0)

The final show:

vyalanwumsft_0-1669949672756.pngvyalanwumsft_1-1669949678640.png


Best Regards,
Community Support Team _ Yalan Wu
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

2 REPLIES 2
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

You could try this measure.

Weekly Rates = 
Var Day_Count= CALCULATE(SUM(act_rates_activity_volume_and_cf_days[data_value]),FILTER(ALL(act_rates_activity_volume_and_cf_days),
            act_rates_activity_volume_and_cf_days[activity_type_1] = "customer_facing_day"))
Var Activity_CT= CALCULATE(SUM(act_rates_activity_volume_and_cf_days[data_value]),
            act_rates_activity_volume_and_cf_days[activity_type_1] = "f2f")
Return
    Divide(Activity_CT,Day_Count,0)

The final show:

vyalanwumsft_0-1669949672756.pngvyalanwumsft_1-1669949678640.png


Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

The issue is when i filter by Product_name and any other column to get lower level result - it set the customer facing days value to zero....

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.