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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
Super User
Super User

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
Super User
Super User

Hi @joshua1990 
Please use the following

1.png

 

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

 

rodrigosan
Resolver III
Resolver III

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.