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
pawlowski6132
Helper V
Helper V

Challenging DAX Problem

Ok, I've been struggling with this all day.

 

I have two tables: 'Forecast' and 'Working Days'.

 

The 'Forecast' table has month and  forecast amount [FK Forecast].

The 'Working Days' table has [Date] and Working or Non Working indicator [Working Day]

 

I'm trying to write DAX (I want a calculated column) that will:

 

1. Iterate throuth the Forecast table and, for each row, evaluate the month and find the corresponding [FK Forecast]

2. For the month in that row of the Forecast table, calculate the working days based on the 'Working Days' table.

3. For each month, calculate the average forecast amount per working day

4. Populate that amount in the [avg_daily_fcst] column

 

pawlowski6132_0-1605042646990.png

 

pawlowski6132_1-1605042687405.png

Thanx in advance.

 

joe

1 ACCEPTED SOLUTION

Hello @pawlowski6132 ,

I've invented my forecast numbers, but I hope it helps

Payeras_BI_0-1605081725344.png

Payeras_BI_0-1605084898355.png

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain

View solution in original post

5 REPLIES 5
Syndicate_Admin
Administrator
Administrator

I was able to replicate this and can confirm it works as described. I'll have some challenges because my dataset is a bit more complicated and I will have to modify to fit but, thanx SO much. I was missing the correct modeling and use of the RELATED function. You're the best. Thank you for taking the time to help me.

pawlowski6132
Helper V
Helper V

Sure, you can see the sample tables in my original post. Here is some of my work so far.

 

pawlowski6132_0-1605045173194.png

 

Hello @pawlowski6132 ,

I've invented my forecast numbers, but I hope it helps

Payeras_BI_0-1605081725344.png

Payeras_BI_0-1605084898355.png

If this post answered your question, please mark it as a solution to help other users find useful content.
Kudos are another nice way to acknowledge those who tried to help you.

J. Payeras
Mallorca, Spain
PaulDBrown
Community Champion
Community Champion

@pawlowski6132

Any chance you can publish a sample of your tables to work with?





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






pawlowski6132
Helper V
Helper V

For example.

 

February 2021 Forecast = 17,270

Working Days in February 2021 = 17

Average Volume per Working Day in February = 1,016

 

Put 1,016 for each "Working" day row where Month is Febraury.

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