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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Afleon
Frequent Visitor

Como puedo mostrar calculos en un rango de fechas

Hola Amigos,

alguien puede ayudarme a ajustar un tablero que he realizado para que haga el calculo de algunas medidas teniendo en cuenta que la fecha seleccionada dentro del segmentador de la fecha de la tabla calendario se encuentre dentro de una fecha inicial y una fecha final, de la tabla condiciones; La idea sería, tengo la siguiente medida:

Generación Precio Fijo =
         IF([Indexador Generación] = "IPC",
            DIVIDE(SUM(Generacion[Precio Fijo]) * SUM(VariablesEconomicas[ValorIPC]),SUM(Generacion[VariablesEconomicas.ValorIPC])
             ,0) *
                SUMX(FILTER(Generacion,Generacion[Tipo Generacion] = "Fijo Constante"),Generacion[Participación (%)]),
                    DIVIDE(SUM(Generacion[Precio Fijo]) * SUM(VariablesEconomicas[ValorIPP]),SUM(Generacion[VariablesEconomicas.ValorIPP])
                            ,0) *
                                SUMX(FILTER(Generacion,Generacion[Tipo Generacion] = "Fijo Constante"),Generacion[Participación (%)])
            )
 
a esta medida poder condicionarla con la siguiente sentencia:
Si, la fecha (Mes) seleccionado se encuentra entre la fecha inicial y la fecha final, realice el calculo con los datos de las columnas que estan dentro de ese rango de fechas.
Espero haberme hecho entender, es que me pidieron tener un historico y las condiciones pueden cambiar en algunos meses entonces el mes que se seleccione que pueda realiazr los calculos de acuerdo a los valores correspondientes a ese periodo.
 
Gracias 
1 REPLY 1
Anonymous
Not applicable

Hi @Afleon ,

Thanks for reaching out to us with your requirement. Base on your description, it seems that you are trying to get the value during date period. You can refer the following links to get it.

Solved: DAX with calculation between start and finish date... - Microsoft Fabric Community

Cross Join =
FILTER (
    CROSSJOIN ( 'Fact Table', 'Calendar date' ),
    [Date] >= 'Fact Table'[StartDate]
        && [Date] < 'Fact Table'[FinishDate]
)

Solved: How to sum values by period based on the start and... - Microsoft Fabric Community

ValueAdded = 
CALCULATE (
    SUM( Project[AddedValue/Month] );
    FILTER (
        Project;
        Project[Start] <= CALCULATE ( MAX ( Dates[Date]) )
    );
    FILTER ( Project; Project[End] >= CALCULATE ( MIN ( Dates[Date] ) ) )
)

If the above one can't help you, please provide some raw data in your table (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.