Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Im creating a data visualization for some local stock market movement every week. e.g. top gainers, top losers, etc.
Want to calculate percentage change between the friday closing price and the monday closing price.
The plan here is to add the succeeding weeks on to the data for some weekly reporting.
Not sure if the process I did makes sense though: I copy and paste daily data on to one main table as suppose to load the daily table to powerbi and perform the calculations from there. Any advise on this area?
We can use LOOKUPVALUE function to get the closing price for the same Stock based on week number and week day. The sample DAX expression would looks like.
WeekNumber = WEEKNUM(Table1[Date])
Weekday = WEEKDAY(Table1[Date])
ThisMondayClosingPrice = IF(Table1[Weekday]=6,LOOKUPVALUE(Table1[Close],Table1[StockCode],Table1[StockCode],Table1[WeekNumber],Table1[WeekNumber],Table1[Weekday],2),BLANK())
Regards,
Charlie Liao
User | Count |
---|---|
77 | |
74 | |
63 | |
61 | |
45 |
User | Count |
---|---|
108 | |
102 | |
93 | |
83 | |
64 |