Forum Discussion
ClaireBear
2 years agoHelper I
Convert Calculated Column into a Measure
Hi, Is there a way to convert the following calculated column into a measure? Due to the size of the report, a calculated column is throwing out a memory error. Calculated column: Prev...
- 2 years ago
Hi
I think i found a solution
I changed the calcuation to read the following:Measure_Previous Product Price =VAR currDate =MAX ( Fact_PO[Doc. Date])VAR currSKU =SELECTEDVALUE (Fact_PO[Material] )VAR currSupplier =SELECTEDVALUE (Fact_PO[Name of Vendor] )VAR prevDate =CALCULATE (MAX ( Fact_PO[Doc. Date] ),FILTER (ALLSELECTED ( Fact_PO ),[Doc. Date] < currDate&& [Name of Vendor] = currSupplier&& [Material] = currSKU))RETURNCALCULATE (MIN (Fact_PO[Net Price ZAR] ),FILTER (ALLSELECTED (Fact_PO ),[Doc. Date] = prevDate&& [Name of Vendor] = currSupplier&& [Material] = currSKU))I now get the same result:
Thank you!
some_bih
2 years agoCommunity Champion
Hi ClaireBear simple create new measure with your definition.
ClaireBear
2 years agoHelper I
Hello, thank you.
I did try this but it throws out an error: