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.
Hi All,
Could someone help me with the below scenerio please? The blank row should have the previous months value as shown in the expected column.
Month | Price | Expected Result |
Jan | 39 | 39 |
Feb | 39 | |
Mar | 39 | |
Apr | 40.31 | 40.31 |
May | 40.31 | |
June | 44.97 | 44.97 |
July | 44.97 | |
Aug | 47.02 | 47.02 |
Sep | 49.13 | 49.13 |
Oct | 49.13 | |
Nov | 46.2 | 46.2 |
Dec | 46.2 |
Solved! Go to Solution.
@Sudharsanan - Let me know if this DAX-based solution meets your requirement, then I'll post the pbix file.
LookupTable = FILTER('Price Table', 'Price Table'[Price] >0)
Derived Price =
VAR currmonth = MAXX(FILTER(LookupTable, LookupTable[MonthNumber] <= SELECTEDVALUE('Price Table'[MonthNumber])),LookupTable[MonthNumber])
VAR result = CALCULATE(MAX('LookupTable'[Price]), LookupTable[MonthNumber] = currmonth)
return result
@Sudharsanan - try this at the power query back end data - Let me know if this fix, then accept it as a solution. Microsoft document on fill down Many Thanks
@Sudharsanan - Let me know if this DAX-based solution meets your requirement, then I'll post the pbix file.
LookupTable = FILTER('Price Table', 'Price Table'[Price] >0)
Derived Price =
VAR currmonth = MAXX(FILTER(LookupTable, LookupTable[MonthNumber] <= SELECTEDVALUE('Price Table'[MonthNumber])),LookupTable[MonthNumber])
VAR result = CALCULATE(MAX('LookupTable'[Price]), LookupTable[MonthNumber] = currmonth)
return result
Thanks @Manoj_Nair but am not sure what you are referring as a Lookup Table here. so pbix file will help me ?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
96 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |