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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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