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
arossello
Frequent Visitor

Problems to replace blank values

Hello everyone,

 

I have a table with a historical quote of currencies, as you can see there are dates with blank values, usually are the holidays, but I need this field to have the value of the last day that has quoted the currency.

 

 

 

 

 

King Regards

values.png

 

 

1 ACCEPTED SOLUTION
BobBI
Resolver III
Resolver III

Hi ,

 

Not sure what extactly you are looking for but as per your screenshot it looks like to want to fill the blanks with previous day value.

 

To do so , Edit query --> Select  eur_usd column --> Go to "Transform" tab --> select Fill down option from FILL.

 

View solution in original post

2 REPLIES 2
BobBI
Resolver III
Resolver III

Hi ,

 

Not sure what extactly you are looking for but as per your screenshot it looks like to want to fill the blanks with previous day value.

 

To do so , Edit query --> Select  eur_usd column --> Go to "Transform" tab --> select Fill down option from FILL.

 

Hello,

the problem is that I am working on a calculated table, but thanks to your answer I was able to find a solution in the community, it is the following:

 

new eur_usd = 
VAR LastNonBlankDate =
     CALCULATE(LASTNONBLANK(cotizaciones[Date];1);
               FILTER(
                ALL(cotizaciones);
                cotizaciones[Date]<=EARLIER(cotizaciones[Date])
                    && NOT( ISBLANK(cotizaciones[eur_usd]) )
                  )
                )
return
    CALCULATE(
        SUM(cotizaciones[eur_usd]);
        FILTER( ALL(cotizaciones); cotizaciones[Date] = LastNonBlankDate)
    )                       

 As you can see the result is fantastic ...

Screenshot_2.png

 

 

The solution I found in:

 

http://community.powerbi.com/t5/Desktop/Dax-fill-down-in-formula/td-p/318991

 

Thank you very much for helping me find the solution

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.