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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Rody
Frequent Visitor

Show MTD Data based on different trading days per state

Hi All,

 

I am using the below formula to show tonnes per day based on different trading days in different states. The formula works in combination with a filter in which you can select the month you would like to see.

Daily Tonnes B =
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "NSW", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.NSW]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "QLD", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.QLD]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "VIC", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.VIC]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "TAS", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.TAS]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "WA", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.WA]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.NSW]),
1))))))

Currently I am building a table in which I want to show the same data, but bypass the need to select the month every month. The table should automatically show the data for the current month. I tried using the formulate below

Daily Tonnes B =
CALCULATE(
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "NSW", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.NSW]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "QLD", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.QLD]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "VIC", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.VIC]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "TAS", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.TAS]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "WA", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.WA]),
if(SELECTEDVALUE('Manu Table - Warehouse translation'[State]) = "", SUM('FY23 Budget'[Tonnes Total B])/SUM('Calendar'[Calendar - Budget trading days.NSW]),
1)))))),DATESMTD('FY23 Budget'[Year_Month]))
However, this is not showing the correct data. The date range in the FY23 Budget table only shows the first of the month with the totals for the month. Could that be an issue?

Thanks heaps
0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.