Forum Discussion
Matthew_BR
3 years agoFrequent Visitor
Round a Number Based on a Columm
Hi, I have a spreadsheet with the names of the items, the package sizes and the demand for the item in the month. Each product can have different types of packaging. I'm trying to create a column...
- 3 years ago
pls try this
Column = VAR t1 = [Demand] VAR m1 = MAXX(FILTER(ALL('Table'),'Table'[Package]<=t1),[Package]) VAR m2 = MINX(FILTER(ALL('Table'),'Table'[Package]>=t1),[Package]) VAR _Results = t1-m1 < m2-t1 RETURN IF(_Results,m1,m2)
Ahmedx
3 years agoSuper User
pls try this
Column =
VAR t1 = [Demand]
VAR m1 = MAXX(FILTER(ALL('Table'),'Table'[Package]<=t1),[Package])
VAR m2 = MINX(FILTER(ALL('Table'),'Table'[Package]>=t1),[Package])
VAR _Results = t1-m1 < m2-t1
RETURN
IF(_Results,m1,m2)Matthew_BR
3 years agoFrequent Visitor
Thank you so much! It worked