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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
craigL01
New Member

Trying to select this months data

Can someone please advise where im going wrong here, im creating a measure where the first two filters are selecting data based on certtain values then i have the this month filters. When i double check my answer using a grid im getting too many records using this dax code.
AAUKNoAccessToSurveyMTD =
CALCULATE(count(PROJTABLE[PROJID]),
FILTER(ABPAWPROJNOTES,ABPAWPROJNOTES[ABPAWNOTETYPE] = "SURVEYFAILED"),
Filter(PROJTABLE,PROJTABLE[AUKProgressStatus] = "No Access to Survey"),
filter(ABPAWPROJNOTES,left(ABPAWPROJNOTES[ABPAWNOTE],9)= "No Access"),
Filter(ABPAWPROJNOTES,ABPAWPROJNOTES[ABPAWINPUTDATETIME].[Date] < today()),
filter(ABPAWPROJNOTES,ABPAWPROJNOTES[ABPAWINPUTDATETIME].[MonthNo] = month(today())),
filter(ABPAWPROJNOTES,ABPAWPROJNOTES[ABPAWINPUTDATETIME].[Year] = year(today())))+0
1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @craigL01 ,

 

You could combine the conditions, please check the formula.

AAUKNoAccessToSurveyMTD =
CALCULATE (
    COUNT ( PROJTABLE[PROJID] ),
    FILTER ( PROJTABLE, PROJTABLE[AUKProgressStatus] = "No Access to Survey" ),
    FILTER (
        ABPAWPROJNOTES,
        ABPAWPROJNOTES[ABPAWNOTETYPE] = "SURVEYFAILED"
            && LEFT ( ABPAWPROJNOTES[ABPAWNOTE], 9 ) = "No Access"
            && ABPAWPROJNOTES[ABPAWINPUTDATETIME].[date] < TODAY ()
            && ABPAWPROJNOTES[ABPAWINPUTDATETIME].[date]
                >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
    )
)

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @craigL01 ,

 

You could combine the conditions, please check the formula.

AAUKNoAccessToSurveyMTD =
CALCULATE (
    COUNT ( PROJTABLE[PROJID] ),
    FILTER ( PROJTABLE, PROJTABLE[AUKProgressStatus] = "No Access to Survey" ),
    FILTER (
        ABPAWPROJNOTES,
        ABPAWPROJNOTES[ABPAWNOTETYPE] = "SURVEYFAILED"
            && LEFT ( ABPAWPROJNOTES[ABPAWNOTE], 9 ) = "No Access"
            && ABPAWPROJNOTES[ABPAWINPUTDATETIME].[date] < TODAY ()
            && ABPAWPROJNOTES[ABPAWINPUTDATETIME].[date]
                >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ), 1 )
    )
)

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors