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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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