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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
powerbiexpert22
Post Prodigy
Post Prodigy

rolling count

i am trying to create line chart to show the rolling count of promoters by yearmonth, it is giving me same results for all yearmonth in table 

 

pbix

https://drive.google.com/file/d/1-3eT8k82RvTSem4EbzZJ_OlUU-A_PiMo/view?usp=drive_link

 

 

 

powerbiexpert22_0-1723012674716.png

promotersrolling2 =

calculate(
    survey2[Promoters],
'Date'[Date]>=EDATE(TODAY(),-3)

&&
'Date'[Date]<=TODAY()
)

 

 

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@powerbiexpert22 , Try using below measure

 

PromotersRollingCount =
CALCULATE(
    COUNT(survey2[Promoters]),
    DATESINPERIOD(
        'Date'[Date],
        LASTDATE('Date'[Date]),
        -3,
        MONTH
    )
)



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

1 REPLY 1
bhanu_gautam
Super User
Super User

@powerbiexpert22 , Try using below measure

 

PromotersRollingCount =
CALCULATE(
    COUNT(survey2[Promoters]),
    DATESINPERIOD(
        'Date'[Date],
        LASTDATE('Date'[Date]),
        -3,
        MONTH
    )
)



Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors
Top Kudoed Authors