Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Dear all
please help me with Power BI:
I have two Data Table:
Table: Stock
Table: Demand
I have add column whitch give me the runing total by day. whitch is run
ning good. see below:
Material | Calendar Day | demand | runningTotal_ |
100000 | 28.04.2023 00:00 | 170 | 170 |
100000 | 15.05.2023 00:00 | 255 | 425 |
100000 | 23.05.2023 00:00 | 255 | 680 |
100000 | 15.06.2023 00:00 | 85 | 765 |
100000 | 22.06.2023 00:00 | 85 | 850 |
100000 | 29.06.2023 00:00 | 425 | 1275 |
100000 | 19.07.2023 00:00 | 340 | 1615 |
100000 | 20.07.2023 00:00 | 255 | 1870 |
100000 | 03.08.2023 00:00 | 170 | 2040 |
100000 | 17.08.2023 00:00 | 255 | 2295 |
100000 | 24.08.2023 00:00 | 170 | 2465 |
100000 | 28.08.2023 00:00 | 85 | 2550 |
100000 | 07.09.2023 00:00 | 255 | 2805 |
100000 | 20.09.2023 00:00 | 170 | 2975 |
100000 | 05.10.2023 00:00 | 255 | 3230 |
100000 | 11.10.2023 00:00 | 170 | 3400 |
100000 | 25.10.2023 00:00 | 255 | 3655 |
100000 | 09.11.2023 00:00 | 170 | 3825 |
100000 | 20.11.2023 00:00 | 170 | 3995 |
no i like to combine this both information. to a dashboard like this.
Stock is: 1000
Date where running total is > then stock is 29.06.2023
Material | stock | out of stock by date |
100000 | 1000 | 29.06.2023 00:00 |
any idea how to solve this?
Hi @sekka_1985 ,
I created a sample pbix file(see the attachment), please find the details in it.
1. Create a what-if paramater
Stock = GENERATESERIES(1, 8000, 1)
2. Create a measure as below
out of stock by date =
VAR _selstock =
SELECTEDVALUE ( 'Stock'[Stock] )
RETURN
CALCULATE (
MIN ( 'demand'[Calendar Day] ),
FILTER ( 'demand', 'demand'[runningTotal_] >= _selstock )
)
3. Create a table visual as below screenshot
Best Regards
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
143 | |
75 | |
63 | |
52 | |
47 |
User | Count |
---|---|
218 | |
86 | |
64 | |
63 | |
60 |