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
Pallekan
New Member

cascading filtered data to all rows with same id

Sample data:

 

IDLocationOperationCurrent operation
5578Loc110False
5578Loc220True
5578Loc330False
5578Loc440False
4428Loc210False
4428Loc320False
4428Loc530True
4428Loc440False

 

I want to add a row that contains CurrentLocation which would like this:

 

IDLocationOperationCurrent operationCurrent Location
5578Loc110FalseLoc2
5578Loc220TrueLoc2
5578Loc330FalseLoc2
5578Loc440FalseLoc2
4428Loc210FalseLoc5
4428Loc320FalseLoc5
4428Loc530TrueLoc5
4428Loc440FalseLoc5

 

I have tried the following measure:

Calculate(

Sample Data[Location],

Filter(Sample data, Sample data[Current operation])

)

 

This unfortunatly does not showcase the location for all rows but only the row with True in currentOperation.

 

Is there an easy solution I'm missing? Do I have to use summarize in some fashion?

 

ps: This is done in live connection so only measures are available.

 

Any insight is appreciated, thank you all!

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @Pallekan 

try to

1) create a measure like this:

CurrentLocation = 
VAR _id = MAX(data[ID])
RETURN
MINX(
    FILTER(
        ALL(data),
        data[ID]=_id
            &&data[Current Operation] = TRUE
    ),
    data[Location]
)

2) plot a table visual with the measure and at least the [ID] column.

 

i tried and it worked like this:

FreemanZ_0-1672153587614.png

View solution in original post

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Pallekan 

try to

1) create a measure like this:

CurrentLocation = 
VAR _id = MAX(data[ID])
RETURN
MINX(
    FILTER(
        ALL(data),
        data[ID]=_id
            &&data[Current Operation] = TRUE
    ),
    data[Location]
)

2) plot a table visual with the measure and at least the [ID] column.

 

i tried and it worked like this:

FreemanZ_0-1672153587614.png

amitchandak
Super User
Super User

@Pallekan , Create a new columns

maxx(filter(Table, [ID] = earlier([ID]) && [Current operation] = "True"), [Location])

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

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.

PBI_Carousel_NL_June

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.