Earlier

Anything related to PowerPivot and DAX Formuale
concorde112
Posts: 1
Joined: Mon Mar 19, 2018 3:24 am

Earlier

Postby concorde112 » Mon Mar 19, 2018 3:41 am

Hi¡¡

I Have the following table:
Image
And I would like the same result as shown on my Pivot table with the measure EstanAA wich DAX formula is the Following:

Code: Select all

EstancAA:=CALCULATE([Estanc];SAMEPERIODLASTYEAR(Calendario[FECHA FOTO]);FILTER(ALL(InformeDiario[Año Query]);[Año Query]=2017))


Image
The problem is I have filtered manually the field [Año Query]=2017 on my formula and I would like to have allways a previuos year shown on the AñoQuery filter.

Thanks for your help

benholmes
Posts: 9
Joined: Tue Jan 30, 2018 9:22 pm

Re: Earlier

Postby benholmes » Thu Mar 22, 2018 7:04 pm

Assuming you've got your calendar table setup correctly, and you filters on your pivot (FECHA FOTO and Ano Query) are the fields from your calendar table NOT the data table I assume you've provided the screenshot of, then there shouldn't be any need to have a filter in the SAMEPERIODLASTYEAR.

So if FECHA FOTO is marked as your date field in your date table, then you should just be able to use the following I would have thought

Code: Select all

EstancAA:=CALCULATE([Estanc],SAMEPERIODLASTYEAR(Calendario[FECHA FOTO])))


Return to “PowerPivot/DAX”

Who is online

Users browsing this forum: No registered users and 3 guests

cron