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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate previous month total when dates are multiple

Hi, 

I am calculating total of previous month with condition. I am getting error as below

image.png

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Previous Month = CALCULATE(COUNT(RADsNow[Number]), PREVIOUSMONTH('Created Date' [Date]))
 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

16 REPLIES 16
aj1973
Community Champion
Community Champion

Hi @Anonymous 

You need a Calendar table to be able to use Time intelligence functions. your current date column contains duplicate values.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 ,

How to solve this ?

I need it in a measure 

aj1973
Community Champion
Community Champion

I just told you, You need a Calendar table in your model. Do you have a Calendar table in your model?

Can you screen shot your model?

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

No Calendar table.

image.png

aj1973
Community Champion
Community Champion

Indeed,

Now Add a calendar table and join it to RADsNew at Created column

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 

How to write a measure combing 2 tables ?

 

aj1973
Community Champion
Community Champion

"combing 2 tables" What do you mean?

Can you share your Pibx file? It would be easier and faster.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 

image.png

Now please tell me DAX to calculate total number of RADs from previous month

aj1973
Community Champion
Community Champion

Previous Month = CALCULATE(COUNT(RADsNow[Number]), PREVIOUSMONTH('Created Date' [Date]))
 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 

The value should be 5 but I am getting blank(0).

image.png

aj1973
Community Champion
Community Champion

Would you be able to share your file?

Can't tell where is your new issue now.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 

 

Not sure how to share the file, please do let me know, I am ready to do it 

 

aj1973
Community Champion
Community Champion

Use Google drive, Onedrive, Dropbox...

You can send me the link in private if you want.

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

@aj1973 ,

anyupdate ?

 

aj1973
Community Champion
Community Champion

just sent you a private message

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Anonymous
Not applicable

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.