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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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