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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
joshua1990
Post Prodigy
Post Prodigy

Calculated Column Count same table multiple filters

Hi experts!

I have a table that shows me the status per sales order for specific regions:

Sales OrderRegionStatus
100ADBZ
101ADBZ
100ADBX
101ADBX
102PRIO

 

Now I would like to create a calculated column that shows me per Sales Order if there is an entry for a Sales Order and Region combination with the value 'X'. If so, all rows with this combination should get TRUE, otherwise FALSE.

How is this possible?

1 ACCEPTED SOLUTION
tamerj1
Community Champion
Community Champion

Hi @joshua1990 
Please use the following

1.png

 

Flag = 
NOT ISEMPTY (
    CALCULATETABLE ( 
        Sales, 
        ALLEXCEPT ( Sales, Sales[Sales Order], Sales[Region] ),
        Sales[Status] = "X" 
    )
)

 

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

It is for creating a new column.

 

Untitled.png

 

Condition CC = 
VAR _currentsalesorder = Data[Sales Order]
VAR _currentregion = Data[Region]
VAR _newtablecondition =
    "X"
        IN SUMMARIZE (
            FILTER (
                Data,
                Data[Sales Order] = _currentsalesorder
                    && Data[Region] = _currentregion
            ),
            Data[Status]
        )
RETURN
    DIVIDE ( _newtablecondition, _newtablecondition ) + 0

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

tamerj1
Community Champion
Community Champion

Hi @joshua1990 
Please use the following

1.png

 

Flag = 
NOT ISEMPTY (
    CALCULATETABLE ( 
        Sales, 
        ALLEXCEPT ( Sales, Sales[Sales Order], Sales[Region] ),
        Sales[Status] = "X" 
    )
)

 

rodrigosan
Responsive Resident
Responsive Resident

Would it be this?

rodrigosan_0-1657479866916.png

 

Did I solve your problem?
Please mark as solution so others can find this solution.
https://www.linkedin.com/in/rodrigosanpbi/

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.