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
Maddyqc
Frequent Visitor

Not able to filter

Hello,

As you can see, I am a newbie here. I am trying to make a table with tota cases (total rows) and total deaths in the same table. When I make separate tables, it works. When try to have them in the same table, it doesnt work. Your inputs are sincerely appreciated. Thank you

 

Filters.JPG

1 ACCEPTED SOLUTION
edhans
Super User
Super User

It is your data model. One of those tables isn't filtering the other. You can turn on crossfiltering by using something like this:

TEST =
CALCULATE(
    SUM( table2[field] ),
    CROSSFILTER ( table1[key], table2[key], BOTH )
)

But the fundamental issue is your model. You should have a star schema where your field in the table should be from a DIMENSION table that is filtering both of these FACT tables vs having the FACT tables filter one another. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

4 REPLIES 4
Tahreem24
Super User
Super User

Are you using values from two different tables and try to put them in the same table visuals? If yes, so  check the relationship between those table.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
edhans
Super User
Super User

It is your data model. One of those tables isn't filtering the other. You can turn on crossfiltering by using something like this:

TEST =
CALCULATE(
    SUM( table2[field] ),
    CROSSFILTER ( table1[key], table2[key], BOTH )
)

But the fundamental issue is your model. You should have a star schema where your field in the table should be from a DIMENSION table that is filtering both of these FACT tables vs having the FACT tables filter one another. 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Thank you, edhans.

Great @Maddyqc - can you please mark the respons as the "solution" so the thread can be marked done and future community users can see the solution that worked?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.