Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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:
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!
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
@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? 😞
@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")
)
)
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.