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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Filter table visual with DAX

Hi! A problem I have seems to be light but strange obstacles occurred while I was trying to solve it, and so I am here asking for your help. 

 

I have a table 'DB Stores' including contact information such as owners' names, phone numbers, contact emails, and trading status information - boolean fields meaning if a corresponding service is enabled or not, e.g. "PayOutsideEnabled". In my report, I need to show in the first table only stores that have at least one enabled service and in the second table stores with no services turned on. Moreover, I should filter the values by month in "LastUpdate" field, so, actually, these tables will show the last status changes. 

I decided to write a measure with needed logic and 1/0 as output and then filter the tables by its result. The example below is a bit simplified version of my code. Actually, there are 9 enabled-ish variables.

 

Table_TurnOn =
VAR BookingTableEnabled = FIRSTNONBLANK( 'DB Stores'[BookingTableEnabled], 1)
VAR TableOrderEnabled = FIRSTNONBLANK( 'DB Stores'[TableOrderEnabled], 1)
VAR result = IF( OR(BookingTableEnabled, TableOrderEnabled) = TRUE(), 1, 0)
RETURN 
result
 
Then I filter the tables with no-code filters. 
For a code like in the example I get the right answer, ...

 

Example1.png

 

...but if I change TRUE() to FALSE() in IF's condition, I will get 

 

Example2.png for all the stores I got with the previous function.

Any ideas on how I can fix my code or filter the tables? Thank you.

2 REPLIES 2
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Try to modify your measure as below:

 

Table_TurnOn =
VAR BookingTableEnabled = FIRSTNONBLANK( 'DB Stores'[BookingTableEnabled], 1)
VAR TableOrderEnabled = FIRSTNONBLANK( 'DB Stores'[TableOrderEnabled], 1)
VAR result = AND( OR(BookingTableEnabled, TableOrderEnabled) = TRUE(), 1, 0)
RETURN 
result

 

 

 

Best Regards,
Kelly

Did I answer your question? Mark my post as a solution!

lbendlin
Super User
Super User

Please be more specific when you say "table" - I get confused when you mean your source data table and when you mean your table visuals.

 

Please provide sample data in usable format (not as a picture) and show the expected outcome.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.