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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Syndicate_Admin
Administrator
Administrator

Fill in data

Very good, I continue with my problems to fill in data.

If someone can tell me where to look to understand how Power BI deals with these problems, I would appreciate it.

In the meantime I pose the problem, I have simplified it to the maximum. Obviously there are many articles

I have three a table with three columns

Article Price Date

122 6,3797 23/10/2022

122 6,4459 25/10/2022

122 5,0000 01/12/2022

What I want is to generate a table like the following:

Month October November December

Article 6.4128 6.4128 5

That is to say for November that has no movements, I take the average of the last month with data, which can be the previous or more behind.

If I use

Media = AVERAGE(fLineasPedidos[Price]) I have the average for the months with values, but November leaves it blank
If I use
Last Measure =
CALCULATE (
LASTNONBLANKVALUE ( dFechas[Date], [Media] ),
dFechas[Date] <= .MAX ( dFechas[Date] )
)
I am not dragged by the average of the previous month, but by the average of the last day of the month.
That is to say for October and November it puts me 6.4459 if I had several values for that day if I calculate its average.
The truth is that I am a little lost and a little desperate since I have already made several consultations of the same style (with different criteria) that very kindly aveis answered, but I would like to be able to understand what escapes me and be able to understand the codes that you raise, that work correctly, everything is said in passing.
Thank you very much in advance
2 REPLIES 2
v-xiaotang
Community Support
Community Support

Hi @Syndicate_Admin 

Thanks for reaching out to us.

the sample data is not enough to move on, could you share more data or a sample .pbix file ?

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Of course, I leave you a link to the .pbix file and an explanation within it of the data that is wrong and how they should go

https://www.dropbox.com/s/03lkt80hhy17hz6/Ejemplo.pbix?dl=0

Thanks a lot

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.