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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GabrielaD
Frequent Visitor

How to show the yearly saving when I have as date range the contract start and end date

Hello PBI experts 🙂 

 

I am a begginer in Power BI and I struggling with a topic, searched for answeres but I found myself stuck as nothing that I've tried helped me.

In my Report I have the annual savings, and I want to show it for every contractual year, but the only date range that I have is the start and end date of the contract.

 

I created a calendar using this measure: 

Calendar = CALENDAR(MINX('Awarding report_Global',[Contract_Start (mm/dd/yyyy)]),MAXX('Awarding report_Global',[Contract_End (mm/dd/yyyy)])) 

 

Consequently, it's showing me the annual saving only in the last contractual year.

 

Could you provide your advice? Again, I am a beginner and don't have so much DAX knowledge 🙂 

 

Thank you!

 
4 REPLIES 4
v-luwang-msft
Community Support
Community Support

Hi @GabrielaD ,

Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien

Hi @v-luwang-msft ,

 

Thank you for your message. The problem hasn't been solved, and I still cannot find a solution for it.

Consequently, I cannot accept any current replies as a solution.

 

Best regards,

Gabriela

GabrielaD
Frequent Visitor

@amitchandak thank you very much for your quick response!

 

I tried creating above measure but I receive the following error : The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.

 

Do you have any idea why? 😞

 

amitchandak
Super User
Super User

@GabrielaD , Create one like

 

Calendar =
var _min1 = MINX('Awarding report_Global',[Contract_Start (mm/dd/yyyy)])
var _max1 = MAXX('Awarding report_Global',[Contract_End (mm/dd/yyyy)])
var _min = eomonth(_min1, -1*month(_min1))+1
var _min = eomonth(_max1, 12-1*month(_max1))+1
return
Calendar = Addcolumns(calendar(_min, _max), "Month no" , month([date])
, "Year", year([date])
, "Month Year", format([date],"mmm-yyyy")
, "Month year sort", year([date])*100 + month([date])
, "Qtr Year", format([date],"yyyy-\QQ")
, "Qtr", quarter([date])
, "Month",FORMAT([Date],"mmmm")
, "Month sort", month([DAte])
, "Is Today" ,if([Date]=TODAY(),"Today",[Date]&"")
, "Month Type", Switch( True(),
eomonth([Date],0) = eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0)= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY") )
,"Year Type" , Switch( True(),
year([Date])= year(Today()),"This Year" ,
year([Date])= year(Today())-1,"Last Year" ,
Format([Date],"YYYY")
)
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors