Forum Discussion

Rigoleto's avatar
Rigoleto
Helper II
8 years ago
Solved

Stand alone Formulas

Hi, Since my skills about Power BI are in progress I have a lot of questions, currently I am writting a report that use a lot of business rules and there are some formulas(business rules) that need t...
  • v-juanli-msft's avatar
    8 years ago

    Hi Rigoleto

    Let me show you an example

    create a calculated column

    column =
    CONCATENATE (
        CONCATENATE ( DATEDIFF ( [set up time], [datetime1], HOUR ), ":" ),
        MOD ( DATEDIFF ( [set up time], [datetime1], MINUTE ), 60 )
    )

    Or, you can create a measure

    Measure =
    CONCATENATE (
        CONCATENATE (
            DATEDIFF ( MAX ( [set up time] ), MAX ( [datetime1] ), HOUR ),
            ":"
        ),
        MOD ( DATEDIFF ( MAX ( [set up time] ), MAX ( [datetime1] ), MINUTE ), 60 )
    )

     

    Best Regards

    Maggie