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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
P_BI_Noob
Frequent Visitor

How to filter a graph visual only using select columns from a table visual?

I have a table and graph visual that looks like the following:

P_BI_Noob_0-1707405267376.pngP_BI_Noob_1-1707405292376.png

I want to be able to do 2 things:
1. Only display the latest row for each distinct F, M and L Names. This is starightforward and I know how to accomplish

2. Using that filtered table, be able to click a row and show the full history of payments for each distinct F, M and L Names

Here is what I have attempted thus far:
1. The table visual uses dataset Table1, the graph visual uses

 

 

Table2 = CALCULATEDTABLE('Table1')

 

 

2. I created a measure that looks like the following 

 

 

Measure 2 = 
VAR att = SELECTEDVALUE(Table1[F Name])
VAR att_2 = SELECTEDVALUE(Table1[M Name])
VAR att_3 = SELECTEDVALUE(Table1[L Name])
VAR btt = MAX('Table2'[F Name])
VAR btt_2 = MAX('Table2'[M Name])
VAR btt_3 = MAX('Table2'[L Name])
RETURN
IF(ISBLANK(att) && ISBLANK(att_2) && ISBLANK(att_3), 1, IF(att_2=btt_2 && att=btt && att_3=btt_3, 1, 0))

 

 

The measure works if I only use F name (att and btt) as the table visual columns I want to filter on, but when I add the M and L Name variables, the measure stops working, please advise

1 ACCEPTED SOLUTION

Hi @P_BI_Noob 

 

Do you hope to realize something like this? When selecting a row, the line graph should show the payments of the specific person?

vjingzhanmsft_0-1707469766815.png

I create a measure [# Payment] to get the latest payment. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@P_BI_Noob , Create these measure and user

 

Last Qty = Var _max = maxx(filter( ALLSELECTED(Data1), Data1[M Name] = max(Data1[M Name]) && Data1[F Name] = max(Data1[F Name]) && Data1[L Name] = max(Data1[L Name]) ),Data1[Date])
return
CALCULATE(sum(Data1[payment]), filter( (Data1), Data1[M Name] = max(Data1[M Name]) && Data1[F Name] = max(Data1[F Name]) && Data1[L Name] = max(Data1[L Name]) && Data1[Date] =_max))

Sum Last Qty = sumx(VALUES(Data1[ID]) , [Last Qty])

 

 

Latest Date
https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you for the response, however I do not believe this fully answers my question. I want the table visual to display the latest payment AND I want the graph visual to display the full history of payments once I select the latest payment from the table visual.

When I select a latest payment from the table visual currently, the graph visual is filtered down to only the latest payment and not the full history of payments

Hi @P_BI_Noob 

 

Do you hope to realize something like this? When selecting a row, the line graph should show the payments of the specific person?

vjingzhanmsft_0-1707469766815.png

I create a measure [# Payment] to get the latest payment. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Yes this is exactly what I wanted to accomplish, I did not include the date in my original table and thus did not use the latest summary option which led to my problems. Thanks for the example!

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.