Reply
Frequent Visitor
Posts: 4
Registered: ‎11-28-2018
Accepted Solution

year to year Or month or month whit filter dax (Power pivot)

Hi all,

I require your help with a specific dax, it turns out that in power pivot I need to create a metric where it shows the sum in quantities of the previous year.

Therefore, when displaying the information in a dynamic table, you can show in one column the amount of the year filtered and the other column the amount of the previous year.

if I do not have filters the formula is working for me, but when I apply a filter, the yoy remains empty

capture 1.PNG

but I need to finally be that way

Capture 2.PNG

 

and not only with the previous years but with the months of that year

 

this is the dax

 

NextYear_count:=CALCULATE (
SUM(Data[UNITS]);
FILTER(
ALLSELECTED(Data);Data[Fiscal Year]=MAX(Data[Fiscal Year])-1)
)


Accepted Solutions
Community Support Team
Posts: 4,024
Registered: ‎07-09-2016

Re: year to year Or month or month whit filter dax (Power pivot)

@judato88,

 

Just change ALLSELECTED to ALL.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post


All Replies
Community Support Team
Posts: 4,024
Registered: ‎07-09-2016

Re: year to year Or month or month whit filter dax (Power pivot)

@judato88,

 

Just change ALLSELECTED to ALL.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.