The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
good afternoon, I have a design
I capture the year and month of the slicer, I need to get a value for the same period of a year before, for which I make the following formula
now I need to add the value of the column for that month I use this
but in the table if there data
what can be my mistake?
I currently only have one table as shown in the image
what I want is from selecting a month
get the value of the value column for a previous year and the previous month
You need to modify the filter context to include the full table, by using ALL() or similar.
hello, what a pity it is not very clear to me how to do it, you help me on the formula as serious that pity
something like
total_mes_ant =
var mes_ant = EDATE(SELECTEDVALUE(Hoja1[my]),-12)
return calculate(SUM(Hoja1[Value]),ALLSELECTED(),Hoja1[my]=[mes_ant])
or
total_mes_ant = calculate(SUM(Hoja1[Value]),SAMEPERIODLASTYEAR(Hoja1[my]))
generates the following error
too many brackets
total_mes_ant =
var mes_ant = EDATE(SELECTEDVALUE(Hoja1[my]),-12)
return calculate(SUM(Hoja1[Value]),ALLSELECTED(),Hoja1[my]=mes_ant)
hello indeed the formula is fine, but the value is still blank
- show your data model
- consider using SAMEPERIODLASTYEAR()