cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nitin_bhatnagar
Helper IV
Helper IV

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

@nitin_bhatnagar , 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] )))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@nitin_bhatnagar , 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] )))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power BI October Update 2021.jpg

Power BI Release

Click here to read more about the October 2021 Release!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Teds Dev Camp Oct. 2021 768x460.jpg

Power BI Dev Camp - October 28th, 2021

Mark your calendars and join us for our next Power BI Dev Camp!