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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Bondeuz
Frequent Visitor

DAX if formula not acting as expected

Hi,

 

I am trying to do a calculation to show the reorder point of my product times a parameter value in order to identify products that is soon in need to be reordered.

 

I am expecting to set the value to "True" if the available inventory is below the reorder value.

Its working as intended without the parameter value but totaly breaks as soon as i add that in the formula.

 

I am expecting the "ReOrder x Parameter" to also be "True" here because that is the case.

 

Bondeuz_0-1686557221901.png

 

 

My measurments looks like this.

 

Avail. Inv. = BON_Items[InventoryField]-(BON_Items[Y365_Qty_on_Sales_Order]+BON_Items[Y365_Qty_on_Component_Lines])
ReOrder Factor = sum(BON_Items[Reorder_Point])*Parameter[Value for Parameter]
ReOrder = IF(BON_Items[Avail. Inv.]<BON_Items[Reorder_Point],"True","False")
ReOrder x Parameter = IF(BON_Items[Avail. Inv.]<[ReOrder Factor],"True","False")

 

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Are you adding it as a column or a measure, because it won't work as a column. Calculated columns are only calculated during data load or refresh, so if you want something to react dynamically to a slicer you will need to implement it as a measure.

View solution in original post

2 REPLIES 2
Bondeuz
Frequent Visitor

Well you learn something every day, changing the if formula to a measurment solved it. I had it as a column.

 

Thanks!

johnt75
Super User
Super User

Are you adding it as a column or a measure, because it won't work as a column. Calculated columns are only calculated during data load or refresh, so if you want something to react dynamically to a slicer you will need to implement it as a measure.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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