March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi, I am having trouble calculating Percentage Change on the previous day
I have a dataset which holds the following data going as far as 14/02/2023
https://drive.google.com/file/d/1LRVC_0-ts6_1BD3kCTTQ8RrVhN0FiPiV/view?usp=sharing
I wanted to add a column to find out what the percentage chanage has been on the previous day from the start of the data set to the end.
I have tried adding in the following column but no joy
Solved! Go to Solution.
try like this:
Stock Change = CALCULATE(sum(qryExportStock_Totals[Total]),
ALL(qryExportStock_Totals),
PREVIOUSDAY(qryExportStock_Totals[StockDate]))
@Ahmedx You have been a great help so far and I have found your tips very useful. I was wondering if you could help me with a final query using the same dataset? For each day I have to work out days worth of stock using another table, however the stock day data changes every month. Can you advise on how I could work out the days stock using the date ranges attached. I did try a few if statements but I couldnt get them to work. I need to divide the total from the orignal data (In pic below - January highlighted Yellow on left by the cell highlighted yellow on the right to get the cells highlighted in Green as the final output) for everyday
extra data is here
Again any help will be appreciated.
@Ahmedx sorry can you help with this query following on from your solution? Can you advise how I would compare Mon this week to Mon last week for all days of the week i.e. Mon vs Mon, Tues vs Tues, Wed vs Wed etc etc. I understand the first 7 records will be blank. I have updated the dataset to have day of the week see link below https://drive.google.com/file/d/1f2yHQQr2DxlXfcUyUMNcEFxl-6TXtloj/view?usp=sharing
I have tried adding on the solution you gave by adding 7 days but it didnt like what I did and threw up some errors. Thanks in advance
Is this what you are looking for?
@Ahmedx Can this be done in the data table rather than a visual? I dont want to have W1 etc. Wanted to keep the same format as this
but instead of the 3rd column showing previous day, i want it to show 7 days prior like this excel sheet has with colour coding, going all the way down to the end of the data
try like this:
Stock Change = CALCULATE(sum(qryExportStock_Totals[Total]),
ALL(qryExportStock_Totals),
PREVIOUSDAY(qryExportStock_Totals[StockDate]))
Thank you
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
168 | |
116 | |
63 | |
57 | |
50 |