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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
08Tedz40
Frequent Visitor

Help finding correct DAX.

I need some help fining the correct Dax to so that this ADA doesn't break when it combimes the Multi years. they seem to work at the month level and year but once you start selecting multi years the dax breaks and gives weird data. 

the months is the program months measure.  the AMA is just getting a SUM of all years the and the ADA(Year) is for some reason just taking whatever the last year is. 

08Tedz40_7-1691183835044.png

08Tedz40_6-1691183740623.png

08Tedz40_0-1691183388053.png08Tedz40_1-1691183399527.png08Tedz40_2-1691183421340.png

08Tedz40_5-1691183676635.png

 

 

 

1 ACCEPTED SOLUTION
08Tedz40
Frequent Visitor

I was able to fix it with these 2 functions.

Average Attendance (AMA) = CALCULATE(IF([Program Months]>[Progarm Months Ran],[Average Yearly Attendace (AYA)]/[Progarm Months Ran],[Average Yearly Attendace (AYA)]/[Program Months]))

Average Yearly Attendace (AYA) = CALCULATE(SUM([ADA])/[Program Year])

08Tedz40_0-1692223282753.png

 

View solution in original post

2 REPLIES 2
08Tedz40
Frequent Visitor

I was able to fix it with these 2 functions.

Average Attendance (AMA) = CALCULATE(IF([Program Months]>[Progarm Months Ran],[Average Yearly Attendace (AYA)]/[Progarm Months Ran],[Average Yearly Attendace (AYA)]/[Program Months]))

Average Yearly Attendace (AYA) = CALCULATE(SUM([ADA])/[Program Year])

08Tedz40_0-1692223282753.png

 

foodd
Super User
Super User

Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot).

https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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