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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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

Click here to schedule a short Teams meeting to discuss your question.
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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.