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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Torsten82
Frequent Visitor

2 Columns with same value should indicate if they have all a specific value in a 3rd column

Hi there,

 

in our commissioning area we want to visualize which orders can be done right away from the stock.

 

Therefore I need a new column that indicates "ready for commissioning" 

if all lines 'in stock' are green for  the same value in 'order' and 'delivery date'.

 

So I can later set a filter to show only orders whichs are in in stock somplete.

 

Any suggestions?

 

in Stock    order      delivery date      article     value     
green 4249026 20.10.2023 1940213 800
green 4249265 11.08.2023 4200524 100
green 4249265 11.08.2023 4300706 40
red 4249270 23.10.2023 6212522 13
red 4249270 23.10.2023 6212522 1300
green 4249270 23.10.2023 3041122 4
green 4249270 23.10.2023 3044203 3
green 4249475 31.08.2023 3630299 12
green 4249475 31.08.2023 3630299 12
green 4249632 16.08.2023 3040224 9
green 4249632 16.08.2023 2600264 8
green 4249632 16.08.2023 2656655 20
yellow 4249665 11.10.2023 5370035 60
green 4249715 05.10.2023 3690316 62
red 4249715 05.10.2023 6711136 26
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Torsten82 ,

You can create a calculated column as below to get it:

ready for commissioning = 
VAR _count =
    CALCULATE (
        COUNT ( 'Table'[order] ),
        FILTER (
            'Table',
            'Table'[order] = EARLIER ( 'Table'[order] )
                && 'Table'[delivery date] = EARLIER ( 'Table'[delivery date] )
        )
    )
VAR _countgreen =
    CALCULATE (
        COUNT ( 'Table'[order] ),
        FILTER (
            'Table',
            'Table'[order] = EARLIER ( 'Table'[order] )
                && 'Table'[delivery date] = EARLIER ( 'Table'[delivery date] )
                && 'Table'[in Stock] = "green"
        )
    )
RETURN
    IF ( _count = _countgreen, "Yes", "No" )

vyiruanmsft_1-1698231424301.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Torsten82 ,

You can create a calculated column as below to get it:

ready for commissioning = 
VAR _count =
    CALCULATE (
        COUNT ( 'Table'[order] ),
        FILTER (
            'Table',
            'Table'[order] = EARLIER ( 'Table'[order] )
                && 'Table'[delivery date] = EARLIER ( 'Table'[delivery date] )
        )
    )
VAR _countgreen =
    CALCULATE (
        COUNT ( 'Table'[order] ),
        FILTER (
            'Table',
            'Table'[order] = EARLIER ( 'Table'[order] )
                && 'Table'[delivery date] = EARLIER ( 'Table'[delivery date] )
                && 'Table'[in Stock] = "green"
        )
    )
RETURN
    IF ( _count = _countgreen, "Yes", "No" )

vyiruanmsft_1-1698231424301.png

Best Regards

AilleryO
Memorable Member
Memorable Member

Hi,

Not sure it's the most efficient solution, but it works :

TestOrder =
VAR CurrOrder = SELECTEDVALUE( TableOrder[order ] )
VAR CountOrder = COUNTROWS( FILTER( ALL(TableOrder) , TableOrder[order ]=CurrOrder ) )
VAR CountGreen = COUNTROWS( FILTER( ALL(TableOrder) , TableOrder[order ]=CurrOrder && TableOrder[in Stock]="green" ) )
RETURN
IF( CountOrder-CountGreen <> 0, "Not OK", "OK" )
like this :
AilleryO_0-1698052825548.png

Hope it helps

A good way, however I wonder, becuase it shows me always "OK"...?

Beside that I am missing to include the delivery date, because one order could have multiple different delivery dates.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.