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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.