Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Sasha
Helper III
Helper III

Count number of products over time

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

1 ACCEPTED 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.

 

Capture.PNG

Also please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

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
     
ProductExpiration date DateNot expired products
A31/12/2017 01/11/20173
B13/06/2018 01/12/20173
C02/07/2018 01/01/20182
   01/02/20182
   01/03/20182
   01/04/20182
   01/05/20182
   01/06/20182
   01/07/20181
   01/08/20180

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.

 

Capture.PNG

Also please find the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.