Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Calculated Column with multiple conditions

Hi Everyone, This is my first post ever and I hope you awesome people will be able to help me out. I have had a look through the forums and I found a few posts related to this topic that got me ...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

    I created a sample pbix file(see attachment) for you, please check whether that is what you want.

    1. Please refer the following link to connect the XLS file in Power BI Desktop

    Connect to Excel in Power BI Desktop - Power BI | Microsoft Learn

    2. Create two calculated columns as below:

    IsOverdue = 
    IF (
        NOT ( ISBLANK ( 'Action Log'[Date Closed] ) ),
        "NA",
        IF ( 'Action Log'[Due Date] < TODAY (), "Overdue", "Not due" )
    )
    OverdueActions = 
    IF (
        'Action Log'[IsOverdue] IN { "NA", "Not due" },
        0,
        DATEDIFF( 'Action Log'[Due Date], TODAY () ,DAY)
    )

    If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

    How to upload PBI in Community

    Best Regards