Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Pedro_borges
Regular 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:

Pedro_borges_0-1692195241084.png


I tried to create a measure like the one below, but it gives always 1.

Return Measure = DIVIDE(
    SELECTEDVALUE(Resultados[Cota FIC]),CALCULATE(SELECTEDVALUE(Resultados[Cota FIC]), FIRSTDATE(Resultados[Data]))
)
 
With this measure, this is my graph:
Pedro_borges_2-1692195321173.png

 


How can I achieve this?
1 ACCEPTED SOLUTION
Anonymous
Not 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 )

vyiruanmsft_0-1692340110601.png

Best Regards

View solution in original post

2 REPLIES 2
Anonymous
Not 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 )

vyiruanmsft_0-1692340110601.png

Best Regards

It worked perfectly. Thank you!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors