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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
joshua1990
Post Prodigy
Post Prodigy

Count all Orders regardless the Date Relationship

Hello everybody!

I need to calculate the number of orders with a specific status.

The order table has the following structure:

OrderStatusDate (key)Item (key)
15001.01.2019A

 

This table is linked to the calendar table and to the item master (Item > Area).

Now I need the calculate the number of orders that have the status "50" regardless of the date.

The following function is not working:

Status = COUNTX(FILTER(ALL(Orders),Orders[Status]=16),Orders[Order])

 

I get the correct number of work orders but this result is displayed at every area in the item master>

  • Area A = 1000
  • Area B = 1000

It should be something like

  • Area A = 500
  • Area B = 300
  • Area C = 200



1 ACCEPTED SOLUTION
kriscoupe
Solution Supplier
Solution Supplier

Hi @joshua1990,

 

Cant you do something like (assuming the table has one row per order)

 

CALCULATE(
    COUNTROWS( Orders ),
    ALL( Calendar Table ),
    Orders[Staus] = 50
)

 

Not sure if you wanted orders status to be 50 or 16 from your question but just replace accordingly.

 

Hope it helps

 

Kris

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@joshua1990 , Try one of the two

Status = COUNTX(FILTER((Orders),Orders[Status]=16),Orders[Order])
Status = COUNTX(FILTER(allselected(Orders),Orders[Status]=16),Orders[Order])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
kriscoupe
Solution Supplier
Solution Supplier

Hi @joshua1990,

 

Cant you do something like (assuming the table has one row per order)

 

CALCULATE(
    COUNTROWS( Orders ),
    ALL( Calendar Table ),
    Orders[Staus] = 50
)

 

Not sure if you wanted orders status to be 50 or 16 from your question but just replace accordingly.

 

Hope it helps

 

Kris

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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