Forum Discussion
Pedro_borges
3 years agoRegular Visitor
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...
- Anonymous3 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
Anonymous
3 years agoNot applicable
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
Pedro_borges
3 years agoRegular Visitor
It worked perfectly. Thank you!