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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

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
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 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.

October NL Carousel

Fabric Community Update - October 2024

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