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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Syndicate_Admin
Administrator
Administrator

CALCULATE DIFFERENT WITH TWO FILTERS

Good afternoon

I'm stuck to make this formula. What I need is a different count of dates, but one that takes into account both the month and the id.

That is, in month 7, the 100 employee has been there for 3 days.

josefmc08_0-1629820174299.png

Would there be any way to put this double filter?.

It will make you catch the month filter:

Daily cost July = CALCULATE (
DISTINCTCOUNT ( 'Production Data: Capacity Hours (Antonio)'[DAY] ),
FILTER (
ALLSELECTED ( 'Production Data: Capacity Hours (Antonio)' ),
'Production Data: Capacity Hours (Antonio)'[MO] = 6 ))

But for the employee filter, you have to depend on each employee, not do a =100 (for example)

In other words, I don't want to:

CALCULATE (
DISTINCTCOUNT ( 'Production Data: Capacity Hours (Antonio)'[DAY]),
FILTER (
ALLSELECTED ( 'Production Data: Capacity Hours (Antonio)' ),
'Data Production: Hours Capacity (Antonio)'[MES] = 7 &&'Data Production: Hours Capacity (Antonio)'[SAP ID]=100))
Because I want the data that comes out in the column to depend on the ID
2 ACCEPTED SOLUTIONS
DataInsights
Super User
Super User

@josefmc08,

 

Try this measure:

 

RESULTADO CONTAR DISTINTO = 
CALCULATE (
    DISTINCTCOUNT ( 'Production Data: Capacity Hours (Antonio)'[DAY] ),
    ALLEXCEPT (
        'Production Data: Capacity Hours (Antonio)',
        'Production Data: Capacity Hours (Antonio)'[ID],
        'Production Data: Capacity Hours (Antonio)'[MO]
    )
)

 

DataInsights_0-1629898272401.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

That's great!!!

It works perfect. Thanks a lot!

View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@josefmc08,

 

Try this measure:

 

RESULTADO CONTAR DISTINTO = 
CALCULATE (
    DISTINCTCOUNT ( 'Production Data: Capacity Hours (Antonio)'[DAY] ),
    ALLEXCEPT (
        'Production Data: Capacity Hours (Antonio)',
        'Production Data: Capacity Hours (Antonio)'[ID],
        'Production Data: Capacity Hours (Antonio)'[MO]
    )
)

 

DataInsights_0-1629898272401.png

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




That's great!!!

It works perfect. Thanks a lot!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.