Forum Discussion

Pedro_borges's avatar
Pedro_borges
Regular Visitor
3 years ago
Solved

Create a dynamic return measure in power BI

Hi,   I need to create a dynamic return graph in power BI to calculate return for a given period (Final/First Value), based in one slicer for Fund, and other for date, like below: I tr...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi Pedro_borges ,

    Please update the formula of measure [Return Measure] as below and check if that is what you want. You can find the details in the attachment.

    Return Measure = 
    VAR _mindate =
        CALCULATE ( MIN ( Resultados[Data] ), ALLSELECTED ( 'Resultados' ) )
    VAR _fdCFIC =
        CALCULATE (
            SUM ( 'Resultados'[Cota FIC] ),
            FILTER ( ALLSELECTED ( 'Resultados' ), 'Resultados'[Data] = _mindate )
        )
    RETURN
        DIVIDE ( SUM ( 'Resultados'[Cota FIC] ), _fdCFIC )

    Best Regards