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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I have a status table with the following 5 fields:
Based on these field I can manually check each moment in time that a product was in stock, limited in stock or out of stock. But now I want to put it into a line graph. So on 07/03/2022 we have 500 products in stock, 25 products limited in stock and 10 products out of stock. On day 2 (08/03/2022) we have 490 products in stock, 30 products limited in stock and 15 products out of stock. But I only have a from and a to date. Not the status date of 07/03/2022 or 08/03/2022 to use as the x-axis, but only the full period based on the from and to dates.
What is the best way to define what the status was on a particular day so it can easily be shown in a chart or graph.
Hi,
What is the purpose/use of the "Is Current" column? Share data in a format that can be pasted in an MS Excel workbook.
So create a simple flag for the latest results. It can be possible that a record has been deleted, so the date to is yesterday. But it is still the latest version, so the is current = true.
There might be more efficient ways, but you could use a DAX approximate lookup with an unrelated date table:
https://excelwithallison.blogspot.com/2020/06/dax-approximate-lookup.html
https://excelwithallison.blogspot.com/2021/09/power-bi-forecasting-with-irregular.html
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
I don't understand the explanation how to convert these periods into a daily state based on date.
Hi @debiesven,
Did this flag field manually add on the data source side?
If that is the case, you can create a calculated column to compare with the date field with Dax today function and set a flag based on the result, these function results will be re-calculated every time the system date changes.
Flag =
IF ( Table[Date] = TODAY (), "Today" )
TODAY function (DAX) - DAX | Microsoft Docs
Regards,
Xiaoxin Sheng
Hi,
Thanks for your reply. The Is current flag is generated by our data warehouse. So that one is okay. My question is only about mapping the period to a certain date so I can plot it on a historical graph.
Hi @debiesven,
>>My question is only about mapping the period to a certain date so I can plot it on a historical graph.
It sounds like a common requirement about date value mapping to the date range defined by multiple fields. For this scenario you can refer to the following blog 'start date', 'end date' part or try to create a bridge table that expands the date range to map to the detailed date records:
Solved: Spread revenue across period based on start and en... - Microsoft Power BI Community
Regards,
Xiaoxin Sheng
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 51 | |
| 41 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 125 | |
| 108 | |
| 46 | |
| 29 | |
| 27 |