Skip to main content
cancel
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

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
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.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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