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
akfir
Helper V
Helper V

Slicer of a measure based on whether it is greater than zero or not

Hi,
i have a model with several fact tables (such as orders, sales etc.). my main pivot fact table is customers.
i have built some measures calculating sum of sales/orders/etc in the last X months (X is being selected as a parameter by the user in a dedicated slicer).
i have a table visual of customers (row per customer) and in columns there are all the measures i mentioned above.
my aim is adding slicers as number of measures above which simply filter the table by --measure is greater than zero or not-- (true/false) and of course change the count of customers' card visual accordingly. 
i hope its clear.
thanks in advance,
Amit


3 REPLIES 3
akfir
Helper V
Helper V

Thanks for your reply!
if i build one of the above columns (called it "A" for convinience) in Customers table i get this error: <pi>A circular dependency was detected: Customers[A], Customers[Num. Of Devices], Customers[A].</pi>

Hi, @akfir 

Can you share a sample file for further research?

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@akfir , for a measure filter use a visual level filter or values/summarize depending on the number of columns

 

Countx(Filter(Values(Customer[Customer]), [Sales] >0), [Customer])

 

or

 

Countx(Values(Customer[Customer]), if([Sales] >0, [Customer], blank()))

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.

Top Solution Authors