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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
siros92
Frequent Visitor

Help needed with lastnonblank

Hi all, in advance thanks for helping out. 

 

I have a bit of a weird behaviour from lastnonblank which probably is due to my lack of understanding..

I've got two columns that are relevant to my question here one is [Scoring] which contains the score given at a certain date. It only contains data on dates assessments were done. Each row in my dataset represents a date and the column latest score in which I am attempting for powerbi to repeat the latest score for a individual. 

As you can see from the first picture i get lastnonblank to repeat the result as long as the next grade is higher than the first. if the next grade is lower as in this example it just ignores it completely. the previous grade to the one i've shown is 3 which should be showing until there is a new grade in the [Scoring] column.  I've also added a picture of the DAX. 

 

Help would be very much appreciated. 

Just to be clear, the result im looking for is for power bi to repeat whatever the last value in column [score] was based on the date. 

 

last non-blank ignore.PNGlast non-blank formula.PNG

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @siros92 ,

 

What is the expected result of the screenshot you shared above?

And what are [Globalweek] and [Site Nr] in your table?

Please show some sample data if you need DAX help.

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

@siros92 Second parameter of LASTNONBLANK should be calculated expression, not just interger. In your case second parameter doesn't give any blank values, there always result equals 1 and LASTNONBLANK doesn't retrieve any value from [Scoring] column.

Thanks Marik, any suggestions as to how to make the calculated expression?

Cheers, 

Anonymous
Not applicable

There is lack of details to make some suggestion.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.