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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Hyperchef1969
Helper V
Helper V

Count all function not influenced by date

Hi,

Hi,

 

I am trying to calculate the total lines backlog in the relating table not influenced by any date.

 

Backlog is a filter on OTD category. This DAX function which is active now (output in beneeth table):

Total_Lines_Backlog = CALCULATE(COUNT(PD_vs_shipped_date[Item_Number]), PD_vs_shipped_date[OTD_category] = "Backlog")

 

So what I want is that the total lines backlog is always calculated at the full total of the table, not influenced by any date or slicer, which is 108 lines. I tried to use the ALL function, but not successfully. Can anyone help?

 

OTD_test - Power BI Desktop_2018-08-23_09-58-32.png

2 ACCEPTED SOLUTIONS
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Hyperchef1969,

 

You could have a try with the formula below.

 

Total_Lines_Backlog =
CALCULATE (
    COUNT ( PD_vs_shipped_date[Item_Number] ),
    FILTER (
        ALL ( PD_vs_shipped_date ),
        PD_vs_shipped_date[OTD_category] = "Backlog"
    )
)

If you still need help, please share some data sample and your desired output so that we can help further investigate on it?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=CALCULATE(COUNT(PD_vs_shipped_date[Item_Number]),PD_vs_shipped_date[OTD_category] = "Backlog",ALL(Calendar))

 

I have assumed that:

 

  1. There is a Calendar Table
  2. There is a relationship from the Date column of your PD_vs_shipped_date Table to the Date column of your Calendar Table
  3. In the Calendar Table, you have the YearMonthnumber column
  4. In your visual, you will drag the YearMonthnumber field from the Calendar Table

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

 

Try this measure

 

=CALCULATE(COUNT(PD_vs_shipped_date[Item_Number]),PD_vs_shipped_date[OTD_category] = "Backlog",ALL(Calendar))

 

I have assumed that:

 

  1. There is a Calendar Table
  2. There is a relationship from the Date column of your PD_vs_shipped_date Table to the Date column of your Calendar Table
  3. In the Calendar Table, you have the YearMonthnumber column
  4. In your visual, you will drag the YearMonthnumber field from the Calendar Table

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Hyperchef1969,

 

You could have a try with the formula below.

 

Total_Lines_Backlog =
CALCULATE (
    COUNT ( PD_vs_shipped_date[Item_Number] ),
    FILTER (
        ALL ( PD_vs_shipped_date ),
        PD_vs_shipped_date[OTD_category] = "Backlog"
    )
)

If you still need help, please share some data sample and your desired output so that we can help further investigate on it?

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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