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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

Visual Filtering

Hi All,

 

I currently have two tables as per the below dataset examples;

 

Task IDTonnage
11
22
34
42
52
64

1st table

 

Task IDHeight
12
21
32

2nd table

 

Please note the 1st table with 'Tonnage' included has more 'Task ID' fields than the second table. I want to display a card visual showing the total SUM tonnage but only show the SUM tonnage for all Task ID's in the 2nd table. Please note both real sets of data are over 100,000 rows long so it is not practical and manually filter the 1st tables 'Task ID'.

 

Many thanks,

 

E

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try like

calculate(sum(table1[Tonnage]),filter(Table1, Table1[Task ID] in Values(Table2[Task ID])))
calculate(sum(table1[Tonnage]),filter(Table1, Table1[Task ID] in allselected(Table2[Task ID])))

 

Or use treatas

https://docs.microsoft.com/en-us/dax/treatas-function

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

View solution in original post

3 REPLIES 3
sdjensen
Solution Sage
Solution Sage

Create a new table with the distinct values of task_id from 2nd table and link the 1 tables to the new table. Then create a filter in the report where you deselect values on blank task_id (first select all and then deselect blank - this will create a different from filter that will include new task_id when models update). This should only include task_id present in the 2nd table.

/sdjensen
amitchandak
Super User
Super User

@Anonymous , Try like

calculate(sum(table1[Tonnage]),filter(Table1, Table1[Task ID] in Values(Table2[Task ID])))
calculate(sum(table1[Tonnage]),filter(Table1, Table1[Task ID] in allselected(Table2[Task ID])))

 

Or use treatas

https://docs.microsoft.com/en-us/dax/treatas-function

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
Pragati11
Super User
Super User

Hi @Anonymous ,

 

Have you got any relationship between these 2 tables?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

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