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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Function that take into account several rows

Hello everyone, may I request your help for a small problem I have on my PBI:

 

To make it simple, there are two columns: one with the control ID, and one that says active or inactive.

But there can be multiple rows with the same control ID that shows different output (active & inactive) (example below): 

JulienBds_0-1663309625960.png

I would like to identify in the PBI which control  ID has only lines that says “inactive”: if it is the case I will give it the value 0, otherwise (if a control need ID has at least one line “active”) I will give it the value 1 in a new column.
This value will be add to all the lines of the control need ID (in the example It will be 1 for every lines of the new column, even when it says inactive).

 

I hope it is understandable, many thanks in advance for your help.

Best,

Julien

1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Anonymous 

 

Here is the solution,

 

ribisht17_0-1663310503302.png

Solution = if(CALCULATE(min('Table'[Active]),ALLEXCEPT('Table','Table'[Control ID]))="Active",1,0)

 

Regards,

Ritesh

View solution in original post

2 REPLIES 2
ribisht17
Super User
Super User

@Anonymous 

 

Here is the solution,

 

ribisht17_0-1663310503302.png

Solution = if(CALCULATE(min('Table'[Active]),ALLEXCEPT('Table','Table'[Control ID]))="Active",1,0)

 

Regards,

Ritesh

Anonymous
Not applicable

It works indeed, many thanks ! 

Regards,

Julien

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors