cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
icturion
Resolver I
Resolver I

Count records with status T before today

Hi,

 

I'm trying to make a measure that counts the times a value is present before today.

 

This is what i got so far:

MO_T_STATUS_BeforeToday = Calculate(Countrows(AQZ_SAMP_VIEW);AQZ_SAMP_VIEW[MO_Status]="T")<TODAY()

 

The problem is that the measure returns "true" instead of the times the status has occurred.

 

Icturion

1 ACCEPTED SOLUTION
ChandeepChhabra
Solution Specialist
Solution Specialist

Try writing something like this

MO_T_STATUS_BeforeToday =
CALCULATE (
    COUNTROWS ( AQZ_SAMP_VIEW ),
    FILTER (
        AQZ_SAMP_VIEW,
        AQZ_SAMP_VIEW[MO_Status] = "T"
            && AQZ_SAMP_VIEW[Date Column] < TODAY ()
    )
)

Note that I have referenced a dummy date column which I am expecting that you'll have in your data

Thanks

View solution in original post

1 REPLY 1
ChandeepChhabra
Solution Specialist
Solution Specialist

Try writing something like this

MO_T_STATUS_BeforeToday =
CALCULATE (
    COUNTROWS ( AQZ_SAMP_VIEW ),
    FILTER (
        AQZ_SAMP_VIEW,
        AQZ_SAMP_VIEW[MO_Status] = "T"
            && AQZ_SAMP_VIEW[Date Column] < TODAY ()
    )
)

Note that I have referenced a dummy date column which I am expecting that you'll have in your data

Thanks

View solution in original post

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors