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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ArchStanton
Post Prodigy
Post Prodigy

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)


)



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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors