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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
godtooro
Helper II
Helper II

Calculate if

Dear all!

 

Please I need you support.

I want to calculate if [Due Date] < [Date of DataSet].

 

I've tried:

Overdue Amount =
    var _DuelesDate = FILTER(BIFAR000, BIFAR000[Due Date] < BIFAR000[Date of Dataset])

    return

        SWITCH(
            TRUE,
            _DuelesDate, [Amount])
 
But is not working.
 
I've tried:
CALCULATE(
        [Amount],
        BIFAR000[Due Date] < BIFAR000[Date of Dataset])
 
But neither.
 
Do you have an idea?

 

1 ACCEPTED SOLUTION

Thank u @Sandhya1234 !
Working!!!!!!

Thank you so much!

View solution in original post

5 REPLIES 5
Sandhya1234
Helper II
Helper II

Ensure that both the "Due Date" and "Date of Dataset" columns are properly recognized as date types in your data model.

If they are not, you can change their data types by right-clicking on the column header and selecting "Change Type" > "Date."

Hi @Sandhya1234 you were right.
I've changed data type to date and solved.

Sandhya1234
Helper II
Helper II

Hello @godtooro Try this measure.
Overdue Amount = SUMX( FILTER(BIFAR000, BIFAR000[Due Date] < BIFAR000[Date of Dataset]), BIFAR000[Amount] )

Thank u @Sandhya1234 !
Working!!!!!!

Thank you so much!

Hello @godtooro Please accept as a solution!.

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!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.