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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

To filter data for this year, this month and till today?

Hi,

 

I am able to filter data for this year, this month using below query:

Pulls= IF(YEAR(Encomp[Credit_Pull_Date]) = YEAR(TODAY()) && MONTH(Encom[Credit_Pull_Date]) = MONTH(TODAY()),1,0)

 

But now I want to filter data for this year till today. I tried below query but is is not working:

 

Current_Month_CreditPull = IF(YEAR(Encomp[Credit_Pull_Date]) = YEAR(TODAY()) && MONTH(Encomp[Credit_Pull_Date]) = MONTH(TODAY() && (Encomp[Credit_Pull_Date] <= TODAY())),1,0)

 

Please suggest.

 

 

Shikha

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Create two measures

Measure = TODAY()

Measure 2 =
IF (
    YEAR ( MAX ( [date] ) ) = YEAR ( [Measure] )
        && MONTH ( MAX ( [date] ) ) = MONTH ( [Measure] )
        && MAX ( [date] ) <= [Measure],
    1,
    0
)

6.png

 

Best Regards

Maggie

Anonymous
Not applicable

Maggie, Thanks a ton for your reply.

I tried your solution but it is not working :(.

 

Hi @Anonymous

What's wrong with it?

Could you share some screenshot?

 

Best Regards

Maggie

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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