Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Convert calculation in tableau to powerBI

Hi Power BI guru's, Can you please help me to build a logic in power BI for the below Metric which was created using Tableau logic: Is Allocated= STR(TODAY() >= CASE [Allocation Start Date] WH...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Anonymous ,

    You can create a calculated column as below to get it, please find the details in the attachment.

    Is Allocated = 
    TODAY ()
        >= IF (
            ISBLANK ( [Allocation Start Date] ),
            DATE ( 1900, 1, 1 ),
            [Allocation Start Date]
        )
        && TODAY ()
            <= IF (
                ISBLANK ( [Allocation End Date] ),
                DATE ( 9999, 12, 31 ),
                [Allocation End Date]
            )

    Best Regards