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

Don'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.

Reply
Giada90
Helper III
Helper III

problem with date

Hi,

I use a formula like this:

measure = calculate(sum(field),'table'[date]<=31/12/22)
If I use this formula it doesn't work, it seems it doesn't recognise date, how can I do?
The field date is in date format
quantitydate
101/03/22
207/03/22
320/04/22
520/3/23
83/4/23
1 ACCEPTED SOLUTION
DOLEARY85
Resident Rockstar
Resident Rockstar

Your measure would also work if you change the date of 31/12/22 to date(2022,12,31):

 

Measure 10 = calculate(sum('Table'[field]),'Table'[date]<=date(2022,12,31))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

View solution in original post

2 REPLIES 2
DOLEARY85
Resident Rockstar
Resident Rockstar

Your measure would also work if you change the date of 31/12/22 to date(2022,12,31):

 

Measure 10 = calculate(sum('Table'[field]),'Table'[date]<=date(2022,12,31))
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

DOLEARY85
Resident Rockstar
Resident Rockstar

Hi 

 

try a calculated column with:

 

Column = if('Table'[date] <= date(2022,12,31),CALCULATE(sum('Table'[quantity])),0)
 
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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