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 September 15. Request your voucher.

Reply
Valentin09
Regular Visitor

Measure: Day Average with specific requirements

Hi everyone,

 

I need help with the following database:

Valentin09_0-1746185952522.png

 

I have got the following formula which works fine: 

DayAverage_Duration =
CALCULATE(AVERAGE(stats_df[total_distance]),
          FILTER(stats_df,(stats_df[activity_participation]= "Full")))
 
In the activity_tag tab there are the following possiblities:
- Training
- Match
- Training_AM
- Training_Aktivierung
- Lizenz
 
Now I want the above formula but without data which is tagged as Training_Aktivierung and Lizenz. 
 
Could somebody help me?
 
Thanks a lot!
1 ACCEPTED SOLUTION
V-yubandi-msft
Community Support
Community Support

Hi @Valentin09 ,

Thank you for reaching out to the Microsoft Fabric Community. I tested the solution using a sample dataset that matches your scenario. The DAX formula you were provided works correctly.

DayAverage_Duration = 
CALCULATE(
    AVERAGE(stats_df[total_distance]),
    FILTER(
        stats_df,
        stats_df[activity_participation] = "Full"
            && NOT stats_df[activity_tag] IN { "Training_Aktivierung", "Lizenz" }
    )
)

 

Using the sample data

John Doe → 3100

Alex Miller → 3000

The result is (3100 + 3000) /2= 3050, which I verified in Power BI.

 

FYI:

Vyubandimsft_0-1746430330413.png

Thank you for your response @govind_021  & @mdaatifraza5556 .

 

 If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

 

View solution in original post

4 REPLIES 4
V-yubandi-msft
Community Support
Community Support

Hi @Valentin09 ,

Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as 'Accepted Solution' to assist other community members experiencing the same issue.

V-yubandi-msft
Community Support
Community Support

Hi @Valentin09 ,

Thank you for reaching out to the Microsoft Fabric Community. I tested the solution using a sample dataset that matches your scenario. The DAX formula you were provided works correctly.

DayAverage_Duration = 
CALCULATE(
    AVERAGE(stats_df[total_distance]),
    FILTER(
        stats_df,
        stats_df[activity_participation] = "Full"
            && NOT stats_df[activity_tag] IN { "Training_Aktivierung", "Lizenz" }
    )
)

 

Using the sample data

John Doe → 3100

Alex Miller → 3000

The result is (3100 + 3000) /2= 3050, which I verified in Power BI.

 

FYI:

Vyubandimsft_0-1746430330413.png

Thank you for your response @govind_021  & @mdaatifraza5556 .

 

 If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.

 

govind_021
Super User
Super User

Hi @Valentin09 
Please try this formula , 

CALCULATE(
AVERAGE(stats_df[total_distance]),
FILTER(
stats_df,
stats_df[activity_participation] = "Full" &&
NOT stats_df[activity_tag] IN {"Training_Aktivierung", "Lizenz"}
)
)


Best Regards
Govind Sapkade ( Microsoft Certified Data Analyst , PL 300 Certified , MS Fabric Enthusiast)
Let's Connect
Linkdin - www.linkedin.com/in/govind-sapkade-845104225
Youtube - http://www.youtube.com/@govind_dataanalyst

mdaatifraza5556
Super User
Super User

Hi @Valentin09 

Can you please try the below DAX.

DayAverage_Duration =
CALCULATE(
AVERAGE(stats_df[total_distance]),
FILTER(
stats_df,
stats_df[activity_participation] = "Full"
&& NOT stats_df[activity_tag] IN { "Training_Aktivierung", "Lizenz" }
)
)



If this answers your questions, kindly accept it as a solution and give kudos.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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