Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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:
Thank you
Solved! Go to Solution.
Hi
I think i found a solution
I changed the calcuation to read the following:
I now get the same result:
Thank you!
Hi @ClaireBear not enought infos what is grain of data you have in model and expected level of output. Still, try Measure test
PreviousValue Measure test =
VAR PreviousRow =
TOPN (
1,
FILTER (
Fact_PO,
Fact_PO[Doc. Date] < MAX ( Fact_PO[Doc. Date] )
&& Fact_PO[Material] = SELECTEDVALUE ( Fact_PO[Material] )
),
Fact_PO[Doc. Date], DESC
)
RETURN
MINX ( PreviousRow, [Net Price ZAR] )
Proud to be a Super User!
Hi
Thank you again, The measure unfortunaly returns a blank column.
The table below shows the example data, and the format/structure required.
- There are 2 products with a "Net Price Zar" column by doc date.
- I have added a calculated Column (Calculated Column_Previous Product Price) which shows me the exact result i would like as a measure.
- I want to use a "Measure" instead of a calculated column and get the same result as the "calculated column_previous product" below, same grain of data.
- Even though the calculated column results are correct, it is throwing out a memory error with the live data which is over 100 000 rows so the calculated column is not suitable.
- Most examples available illustrate an index or a date with the previous value calculation which is great, but my issue is that i need the date and the previous value by product in the calculation.
So i would like the measure to show the same results as the calculated column in the example below.
I hope this makes more sense, i appreaciate any advice.
Hi
I think i found a solution
I changed the calcuation to read the following:
I now get the same result:
Thank you!
Hi @ClaireBear
So you want "just" previous row value? Your TOPN misslead me 🙂
The previous row value is based on two columns:Fact_PO[Doc. Date] and Fact_PO[Material]
Proud to be a Super User!
Hi @ClaireBear simple create new measure with your definition.
Proud to be a Super User!
Hello, thank you.
I did try this but it throws out an error:
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 65 | |
| 50 | |
| 42 | |
| 23 | |
| 21 |
| User | Count |
|---|---|
| 139 | |
| 116 | |
| 53 | |
| 37 | |
| 31 |