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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Diego565324
Regular Visitor

Total Acumulado - Datos en blanco

Buenas noches
Al filtrarlo por mes Octubre ( 10) me sale solo lo que tiene datos hasta el mes 10, como podria hacer para que me aparezca tambièn el de Desarrollo en 62.24
Diego565324_0-1697606101651.pngDiego565324_1-1697606115137.png

 

 

 
1 DAX) :
Acumulado Devengado = CALCULATE(sum('GOBIERNO NACIONAL'[MONTO_DEVENGADO]),
                      FILTER(all('GOBIERNO NACIONAL'[MES_EJE]),
                      'GOBIERNO NACIONAL'[MES_EJE] <=MAX('GOBIERNO NACIONAL'[MES_EJE]) ) )
 
2 DAX) :
VAR DEVENGADO =
    [Acumulado Devengado]
VAR PIM =
    CALCULATE(
        SUM('GOBIERNO NACIONAL'[MONTO_PIM]),
        ALL('GOBIERNO NACIONAL'[MES_EJE])
        )
RETURN
    DIVIDE(DEVENGADO,PIM)*100
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Diego565324 ,

According to your description, it seems that you want to get the percentage between the cumulative value [MONTO_DEVENGADO] and the sum of [MONTO_PIM]? You can follow the steps below to get it:

1. Create a separated date dimension table(DO NOT create relationship between this date table and fact table)

2. Create a slicer which applied the field [month field] of date dimension table on it

3. Update the formula of measures as below

Acumulado Devengado =
CALCULATE (
    SUM ( 'GOBIERNO NACIONAL'[MONTO_DEVENGADO] ),
    FILTER (
        ALLSELECTED ( 'GOBIERNO NACIONAL' ),
        'GOBIERNO NACIONAL'[MES_EJE] <= SELECTEDVALUE ( 'Datetable'[month field] )
    )
)
Percentage =
VAR DEVENGADO = [Acumulado Devengado]
VAR PIM =
    CALCULATE (
        SUM ( 'GOBIERNO NACIONAL'[MONTO_PIM] ),
        FILTER (
            ALL ( 'GOBIERNO NACIONAL' ),
            'GOBIERNO NACIONAL'[MES_EJE] <= SELECTEDVALUE ( 'Datetable'[month field] )
        )
    )
RETURN
    DIVIDE ( DEVENGADO, PIM ) * 100

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

How to provide sample data in the Power BI Forum

 

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yiruan-msft
Community Support
Community Support

Hi @Diego565324 ,

According to your description, it seems that you want to get the percentage between the cumulative value [MONTO_DEVENGADO] and the sum of [MONTO_PIM]? You can follow the steps below to get it:

1. Create a separated date dimension table(DO NOT create relationship between this date table and fact table)

2. Create a slicer which applied the field [month field] of date dimension table on it

3. Update the formula of measures as below

Acumulado Devengado =
CALCULATE (
    SUM ( 'GOBIERNO NACIONAL'[MONTO_DEVENGADO] ),
    FILTER (
        ALLSELECTED ( 'GOBIERNO NACIONAL' ),
        'GOBIERNO NACIONAL'[MES_EJE] <= SELECTEDVALUE ( 'Datetable'[month field] )
    )
)
Percentage =
VAR DEVENGADO = [Acumulado Devengado]
VAR PIM =
    CALCULATE (
        SUM ( 'GOBIERNO NACIONAL'[MONTO_PIM] ),
        FILTER (
            ALL ( 'GOBIERNO NACIONAL' ),
            'GOBIERNO NACIONAL'[MES_EJE] <= SELECTEDVALUE ( 'Datetable'[month field] )
        )
    )
RETURN
    DIVIDE ( DEVENGADO, PIM ) * 100

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

How to provide sample data in the Power BI Forum

 

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

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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