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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
ArchStanton
Impactful Individual
Impactful Individual

LastNonBlank Measure not working

Hi,

I have tried to re-open a message that I previously accepted as a solution, it turns out the code doesn't work for all 3 Teams in the pbix file:

 

https://ufile.io/dkhq78t8

 

I have tried using this measure that correctly returns the last non blank value for Team A = 2, B, = 6- but C is 36?

The LastNonBlank Value for Team C is 12 not 36.

 

CALCULATE(
     LASTNONBLANKVALUESheet1[KPI],Sum(Sheet1[KPI])),
     FILTER(
           Sheet1,Sheet1[Area] = "Team A"
     ) )

 

1 ACCEPTED SOLUTION

Hi @ArchStanton ,

Please try:

Last Value = 
IF(ISBLANK(SELECTEDVALUE('Sheet1'[Area])),
"Please select an area",
CALCULATE(
    LASTNONBLANK(Sheet1[KPI], 1),
    ALLSELECTED('Sheet1'[Area])
)
)

vcgaomsft_2-1699945697442.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

4 REPLIES 4
ThxAlot
Super User
Super User

ThxAlot_0-1699634108699.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LeanAndPractise(Everyday)


)



ArchStanton
Impactful Individual
Impactful Individual

Thanks but that doesn't work, I need to apply a Filter on Area as I have many different Team names.

This is for a Card Visual

Hi @ArchStanton ,

Please try:

Last Value = 
IF(ISBLANK(SELECTEDVALUE('Sheet1'[Area])),
"Please select an area",
CALCULATE(
    LASTNONBLANK(Sheet1[KPI], 1),
    ALLSELECTED('Sheet1'[Area])
)
)

vcgaomsft_2-1699945697442.png

 

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

This works perfectly - many thanks for this!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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