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

Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more

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

@Anonymous,

 

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

@Anonymous,

 

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
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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

Top Solution Authors