Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I have a table of Products with each having an expiaration date.
Also, I have a table of Time dimension.
How can I define a measure counting all the products that are not expired over time?
Also, how can I present it on a graph showing only the 1st of each month using time dimension?
Thank you,
Alex
Solved! Go to Solution.
Hi @Sasha,
I made one sample based on your data.
1. Enter the data and create calculated table.
Table = CROSSJOIN('date',Table1)
2. Create a visual as below.
Also please find the pbix as attached.
Regards,
Frank
Hi
How the relationship is defined here? Which column is connected to Time dimension?
When you say "ounting all the products that are not expired over time" - is it for any specific date or period?
Would be easy to help you if you post some sample data and expected result in copy - pasteable format.
Thanks
Raj
Hi,
the relationship is between time dimension and expiration dates on the products table
Sample
Products | Result expected | |||
Product | Expiration date | Date | Not expired products | |
A | 31/12/2017 | 01/11/2017 | 3 | |
B | 13/06/2018 | 01/12/2017 | 3 | |
C | 02/07/2018 | 01/01/2018 | 2 | |
01/02/2018 | 2 | |||
01/03/2018 | 2 | |||
01/04/2018 | 2 | |||
01/05/2018 | 2 | |||
01/06/2018 | 2 | |||
01/07/2018 | 1 | |||
01/08/2018 | 0 |
Hi @Sasha,
I made one sample based on your data.
1. Enter the data and create calculated table.
Table = CROSSJOIN('date',Table1)
2. Create a visual as below.
Also please find the pbix as attached.
Regards,
Frank
Further drill down:
what if I want to turn this table into stacked chart area.
I would like then press on a month on the chart and get a table of all the products' names that are not expired at that point
It works with pressing on a table, it doesn't work when pressing on the chart (the table of products remains the same)
Thanks
Alex
Thanks! It exactly what I was looking for!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
94 | |
84 | |
84 | |
72 | |
49 |
User | Count |
---|---|
143 | |
131 | |
109 | |
64 | |
55 |