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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Regular Visitor

DAX for using FOR EACH function

Pls help to create DAX query for the following requirement....


Requirement - Change the Color of State on Map according to the status of City with respect to the Air Quality and Water Quality parameters.


Each State has approx 100 cities

Each City has several Air Quality and Water Quality parameters.


If Water Quality is Ok for all the cities in that State, then check Air Quality, if OK then Green Else Yellow, else Red(if water quality is OK).


Thanks in Advance.....




Community Support
Community Support

Hi @arhantjain,

Any update on this? Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Resolver III
Resolver III

Can you quickly copy and paste the data set and rephrase the logic you wanted?


Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.


Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.