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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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