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
Anonymous
Not applicable

Problem fetching last value of the selected plans in a hierarchical table

Hi All,

 

I have a table like:

 

PLAN NAMEDATEFAILEDPASSEDNO RUN
abc8/1/2021251
abc8/2/20213102
abc8/3/20215152
def8/1/202113 
def8/2/2021251

 

I also have one slicer which contains unique PLAN NAMES. This can be a single select or multi-select slicer.

 

Now, I want to grab only the last value of all the columns such as "FAILED" from the above table for all the plans selected in the slicer.

 

That means, if I selected both "abc" and "def" plans from the slicer, I want last values of the respective FAILED columns and add them up. i.e. ( [LAST FAILED] value of "abc" plan + [LAST FAILED] value of "def" plan which equals to 5 + 2 from the above table.

 

I know this is possible but I could only fetch the last value from the column and not the selected plans last value.

 

Any quick help will be appreciated.

 

Thanks!

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try one of the two

 


lastnonblankvalue(Table[DATE], max(Table[Failed]))

 

 

calculate(lastnonblankvalue(Table[DATE], max(Table[Failed])), filter(allselected(Table), Table[PLAN NAME] = max(Table[PLAN NAME] )))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try one of the two

 


lastnonblankvalue(Table[DATE], max(Table[Failed]))

 

 

calculate(lastnonblankvalue(Table[DATE], max(Table[Failed])), filter(allselected(Table), Table[PLAN NAME] = max(Table[PLAN NAME] )))

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.