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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
key1012
Regular Visitor

Show total month sales every day for current month with dynamic year and month slicer

Hello, I want to show the total previous month sales value for everyday, with day on x-axis, and update dynamically when year and month slicer is chosen. 

I have a calendar table. (1-to-many relationship to "Reporting Date" in inventory table as below)

I have a inventory table, with each month's inventory appended  every month, with a month-end column "Reporting Date". 

ex)

If today = December,

November inventory = 100 units,

In bar chart, I want to show 100 units for each day (1,2,3,4,5.. 31) when month slicer is selected to December. 

 

If today = January, I want to show December inventory... you get the drill.

 

Please help how i can make this calculated measure ! and if i need to change my Reporting Date relationship, please let me know!

Thanks!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1670902050832.png

 

 

Jihwan_Kim_0-1670902017251.png

 

 

Inventory measure: =
CALCULATE (
    SUM ( Inventory[Inventory] ),
    'Calendar'[Date] = EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1670902050832.png

 

 

Jihwan_Kim_0-1670902017251.png

 

 

Inventory measure: =
CALCULATE (
    SUM ( Inventory[Inventory] ),
    'Calendar'[Date] = EOMONTH ( MAX ( 'Calendar'[Date] ), -1 )
)

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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