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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Dear All,
My knowledge is not that great in power bi, learning from all you guys. I tried solving it but cannot get it. Higly appreciate for taking time to reply. Thank you every one. I have daily stock balance date wise, this is calculated based on the dates available. My issue is i can take get the daily balance but only if i use date as a slicer, if i want into matrix ie product / day 1/ day 2 etc it gives a blank results. Want result like this
| Product | 02-06-2024 | 03-06-2024 | 04-06-2024 | 05-06-2024 |
| Bike | 10 | 25 | 7 | -2 |
| Cycle | 1 | 30 | -5 | 5 |
| Pen | -4 | 14 | 7 | 9 |
| Car | 0 | 15 | 6 | 9 |
| Toy | 30 | 24 | -2 | 8 |
| Pencil | -20 | 22 | 10 | -2 |
Data is like this:
| Product | Date | Unit Price | Stock | Daily Sales Change |
| Bike | 31-05-2024 | 10 | 100 | |
| Cycle | 31-05-2024 | 20 | 154 | |
| Pen | 31-05-2024 | 30 | 160 | |
| Car | 31-05-2024 | 40 | 210 | |
| Toy | 31-05-2024 | 50 | 230 | |
| Pencil | 31-05-2024 | 60 | 260 | |
| Bike | 02-06-2024 | 10 | 110 | 10 |
| Cycle | 02-06-2024 | 20 | 155 | 1 |
| Pen | 02-06-2024 | 30 | 156 | -4 |
| Car | 02-06-2024 | 40 | 210 | 0 |
| Toy | 02-06-2024 | 50 | 260 | 30 |
| Pencil | 02-06-2024 | 60 | 240 | -20 |
| Bike | 03-06-2024 | 10 | 135 | 25 |
| Cycle | 03-06-2024 | 20 | 185 | 30 |
| Pen | 03-06-2024 | 30 | 170 | 14 |
| Car | 03-06-2024 | 40 | 225 | 15 |
| Toy | 03-06-2024 | 50 | 284 | 24 |
| Pencil | 03-06-2024 | 60 | 262 | 22 |
| Bike | 04-06-2024 | 10 | 142 | 7 |
| Cycle | 04-06-2024 | 20 | 180 | -5 |
| Pen | 04-06-2024 | 30 | 177 | 7 |
| Car | 04-06-2024 | 40 | 231 | 6 |
| Toy | 04-06-2024 | 50 | 282 | -2 |
| Pencil | 04-06-2024 | 60 | 272 | 10 |
| Bike | 05-06-2024 | 10 | 140 | -2 |
| Cycle | 05-06-2024 | 20 | 185 | 5 |
| Pen | 05-06-2024 | 30 | 186 | 9 |
| Car | 05-06-2024 | 40 | 240 | 9 |
| Toy | 05-06-2024 | 50 | 290 | 8 |
| Pencil | 05-06-2024 | 60 | 270 | -2 |
Solved! Go to Solution.
Hi @santoshlearner2 ,
I made the following measure:
Daily Changes = VAR PD = CALCULATE(
[Daily Stock],
OFFSET(
-1,
ALLSELECTED('Daily Stocks'[Date]),
ORDERBY(
'Daily Stocks'[Date],
ASC
)
)
)
RETURN
IF(
PD <> BLANK(),
[Daily Stock] - PD
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @santoshlearner2 ,
Not sure what is the issue that you are getting but having the information has you present when you had the data in a Matrix you can get the expected result:
In this case I'm just adding the columns directly to the matrix visual.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi,
Sorry the difference i get per day is as per a measure, the date columns has onlyt the numbers
Warm Regards
Santosh
Hi @santoshlearner2 ,
I made the following measure:
Daily Changes = VAR PD = CALCULATE(
[Daily Stock],
OFFSET(
-1,
ALLSELECTED('Daily Stocks'[Date]),
ORDERBY(
'Daily Stocks'[Date],
ASC
)
)
)
RETURN
IF(
PD <> BLANK(),
[Daily Stock] - PD
)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi,
Thank you for your reply. i feel i am doing something wrong. not getting the result. I appreicate your reply. Your knowledge is vast in this.
Thanks
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!