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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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