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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
omegaboost
Frequent Visitor

DAX for count item from previous period

Dear All,

How to count the number of "aaa" from the previous period? For example, in period 2 the number of "aaa" is 3 and the thing to look for is the number of "aaa" in the previous period, namely period 1.

What is the DAX formula for this condition?

 

Thanks

 

KodePeriod
aaa1
aaa1
aaa2
aaa2
aaa2
aaa3

 

1 ACCEPTED SOLUTION
omegaboost
Frequent Visitor

Dear annonymous1999,

 

Thank you for your reply..and it's work.

View solution in original post

2 REPLIES 2
omegaboost
Frequent Visitor

Dear annonymous1999,

 

Thank you for your reply..and it's work.

eliasayyy
Memorable Member
Memorable Member

hello use this measure

previous count = 
CALCULATE(
    [Count of Period] ,
    'Table'[Period] = MAX('Table'[Period]) - 1)

 

annonymous1999_0-1692004997709.png

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.