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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jdelgard
Regular Visitor

Question regarding DAX formula for calculation value previous month

Hi. 

I have a created a measure that compares the inventory value this month with the previous month. But this value is blank when added to a visual. 

Previous Month =
CALCULATE(COMPACT_STORE_INVENTORY[Lift Inventory Value],
DATEADD(BC_Item[DWDate], -1,MONTH))
 
The lift Inventory value is also calculated with the following formula: 
Lift Inventory Value =
SUMX(
    SUMMARIZE(BC_Item,
    BC_Item[Unit_Cost],
    "Value", SUM(BC_Item[Inventory]) * BC_Item[Unit_Cost]
    ), [Value]
)
 
Any ideas why the Previous Month is blank?
Thanks in advance. 
1 REPLY 1
some_bih
Super User
Super User

Hi @Jdelgard without model and details it is hard to spot issue. Still, try v2 for previous month. You should use some agg.function, like SUM, COUNT ... to use CALCULATE

Previous Month V2 =
CALCULATE(
SUM(COMPACT_STORE_INVENTORY[Lift Inventory Value]),
DATEADD(BC_Item[DWDate], -1,MONTH))





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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