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
Anonymous
Not applicable

Count same day last month by category

Hi,

I have a dataset which have columns as follows:

matpat93_0-1631001250110.png

 

 

And I would like to present count of customers by date along with the count value from same day on previous month as follows:

matpat93_1-1631001385228.png

I tried to write down the measure for that, but unfortunately, it displays the summed value regardless of the category.

 

I have a calendar table & database table in the model. 

Could you please help me with writing proper measures?

 

Thank you!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a month behind measure like given example with help from date table

 

Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a month behind measure like given example with help from date table

 

Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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