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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
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.