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!View all the Fabric Data Days sessions on demand. View schedule
Hello all, and thanks in advance for any feedback on the following question.
I have a rather complex measure that I would like to not simply count the rows that qualify, but rather have the ability to display the rows information (columns) in a list as well.
Is there a way I can structure a measure to do this?
example of my current measure - set up to return the count (sum of an index column) of those that qualify.
Solved! Go to Solution.
Hi @Matt0515 ,
According to your example, you could try SWITCH() function.
SWITCH (
TRUE (),
AND (
OR ( 'Table'[Column X] = "a", 'Table'[Column X] = "b" ),
'Table'[Column Y] = "xyz"
), "Business Unit 1",
AND (
OR ( 'Table'[Column X] = "c", 'Table'[Column X] = "d" ),
'Table'[Column Y] = "abc"
), "Business Unit 2"
)
Hi @amitchandak, sorry not very clear.
The condition is mutually exclusive. How can I create a column in my dataset based on my measure? I imagine that is done in the Query Editor?
Thanks!
@amitchandakAllow me to rephrase:
I have a dataset where I need to identify what business unit each row belongs to.
the definition of each business unit is diffirent than the next.
I would like to create a custom column that will result in the business unit for each row.
The example above would define a specific business unit and the paramiters would change for the next business unit ( and so on )
Where I am struggling is how to structure the Custom Column code to accept multiple paramiters to achieve a single column with multiple results.
example:
IF Column X = "a" OR "b", AND Column Y = "xyz" THEN "Business Unit 1"
OR / ELSEIF
IF Column X = "c" OR "d", AND Column Y = "abc" THEN "Business Unit 2"
Hopefully this makes more sense. I'm ultimatly attempting to make a single column of multiple resuts based on rules that identify exclusive rows.
Thanks
Hi @Matt0515 ,
According to your example, you could try SWITCH() function.
SWITCH (
TRUE (),
AND (
OR ( 'Table'[Column X] = "a", 'Table'[Column X] = "b" ),
'Table'[Column Y] = "xyz"
), "Business Unit 1",
AND (
OR ( 'Table'[Column X] = "c", 'Table'[Column X] = "d" ),
'Table'[Column Y] = "abc"
), "Business Unit 2"
)
Can you share a sample output that you have right now and the sample that you would like to have ?
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!