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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Cookistador
Super User
Super User

How to implement Business Rules?

Hi Everyone,

 

I'm facing a new issue on Power BI
I would like to add some business rules in a smooth manner for the business user

 

Imagine, I have a measure like this one:

 

TargetDepartmentSales = Calculate (Sum(Table['Sales']), Table[City] in {'Arles','Caen','London','Dublin','Berlin','Toronto','San Diego',...) (I use more than 50 cities in this measure)
The idea, would be to store these values in an excel files and allow user to update this table with a powerapps and then read the values via lookup function, so to do that, I could transform my measure in

 

TargetDepartmentSales = 

TargetDepartmentSales = 
VAR FilteringMeasure = LOOKUPVALUE(Table1[Condition],Table1[Name],"Cities")

RETURN(Sum(Table['Sales']),Table[City]  in {FilteringMeasure})

 

But my measure returns Blank, however if I return my Lookupvalue, it returns the correct string: ' Arles','Caen','London','Dublin','Berlin','Toronto','San Diego',...

 

Any idea of how can I solve this problem?

 

Many thanks for your help

2 REPLIES 2
amitchandak
Super User
Super User

@Cookistador , if that table only contains city in a column(The separate table is city)

 

Sum(Table['Sales']),filter(Table, Table[City] in Values(City[City]) ) )

 

Or you can try treatas

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for your reply

But indeed, the table did not contains values only from cities

My idea was to create a table with all filtering conditions like this table, so one line by filter condition

 

Cities         'San Diego','Dublin','London',...
Customer   'Siemens','Eaton','Allen Bradley'

 

This is why I would like to use the Lookupvalues, but maybe I wont have other choice than creating one table by filter

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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