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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Anonymous
Not applicable

Expiring date greater than "today"

Hi,

I am a brand new Power BI user.

Could you please help me create a measure to get as a result only expiration dates greater than "today"?

 

Thanks

1 ACCEPTED SOLUTION
v-cazheng-msft
Community Support
Community Support

Hi @Anonymous,

 

You could try this measure.

ExpectedRes = CALCULATE(MAX('Table'[ExpDate]),FILTER('Table',MAX('Table'[ExpDate])>=TODAY()))

 

Then, the result looks like this.

vcazhengmsft_0-1661238670920.png

 

Attached the pbix file as reference.

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,    

Community Support Team _ Caiyun

View solution in original post

4 REPLIES 4
v-cazheng-msft
Community Support
Community Support

Hi @Anonymous,

 

You could try this measure.

ExpectedRes = CALCULATE(MAX('Table'[ExpDate]),FILTER('Table',MAX('Table'[ExpDate])>=TODAY()))

 

Then, the result looks like this.

vcazhengmsft_0-1661238670920.png

 

Attached the pbix file as reference.

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know. Thanks a lot!

 

Best Regards,    

Community Support Team _ Caiyun

Anonymous
Not applicable

Hi there.

Thank you, very much for your help.
You suggestion worked very well!

 

Best,

Dielson

Anonymous
Not applicable

Hi again.

Thanks for your reply.

Unfortunately, it is not working:

I would like the results to show the all the product's expiration dates only when they are greater than "today".

 

I tried your suggestioned solutions but I got no data as results. I might have used them in a wrong way.

 

Eg.: if today is 08/10/2022 

This is the matrix I would like to get:

ProductExpDateExpected results in the column
109/20/202709/20/2027
201/08/202301/08/2023
312/25/2020This row should not appear on the matrix
404/12/202504/12/2025

 

Could you give me a hint?

 

amitchandak
Super User
Super User

@Anonymous ,

 

countrows(filter(Table, Table[exp Date] > today() ) )

 

or

 

calculate(count(Table[Value]), filter(Table, Table[exp Date] > today() ) )

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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

Top Kudoed Authors