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
kasife
Helper V
Helper V

last 3 months

 

 

 

 

Guys, good afternoon!

I'm having difficulty creating a measurement. What I want to get is the last 3 months within the bar chart. I took a measurement, but it seems to be accumulating

CALCULATE(
    [repasses Realizados],
    FILTER(
        ALL(d_calendario),
        d_calendario[Date] >= EDATE(MAX(d_calendario[Date]), -3)
            && d_calendario[Date] <= MAX(d_calendario[Date])
    )
)

kasife_0-1715378894941.png

I want to get the last 3 months, but without using the screen filter

kasife_1-1715378950131.png

How a do it?

 

 

1 ACCEPTED SOLUTION
xifeng_L
Solution Supplier
Solution Supplier

Hi @kasife ,

 

You can try below measure:

 

CALCULATE(
    [repasses Realizados],
    KEEPFILTERS(
        DATESINPERIOD(d_calendario[Date],EOMONTH(TODAY(),0),-3,MONTH)
    )
)

 

The key is the KEEPFILTERS function.

 

 

If I solve your problem , pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

View solution in original post

4 REPLIES 4
xifeng_L
Solution Supplier
Solution Supplier

Hi @kasife ,

 

You can try below measure:

 

CALCULATE(
    [repasses Realizados],
    KEEPFILTERS(
        DATESINPERIOD(d_calendario[Date],EOMONTH(TODAY(),0),-3,MONTH)
    )
)

 

The key is the KEEPFILTERS function.

 

 

If I solve your problem , pls mark my post as a solution and appreciate your Kudos !

 

Thank you~

 

 

@xifeng_L  it worked. Thank you so much .

bhanu_gautam
Super User
Super User

@kasife , You can try using below measure

 

Last 3 Months Total =
CALCULATE(
[repasses Realizados],
DATESINPERIOD(
d_calendario[Date],
TODAY(),
-3,
MONTH
)
)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




@bhanu_gautam I tried it and didn't work.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Fabric Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors