Forum Discussion
Year on year variance without dates
- 3 years ago
RavM_17 You could create a DAX Index column for your table like this and then it should be easy. PBIX is attached below signature.
DAX Index = VAR __TableText = CONCATENATEX(ALL('Table'),[Year] & ":" & [Period],"|",[Year]&[Period],ASC) VAR __Count = COUNTROWS(ALL('Table')) VAR __Table = ADDCOLUMNS( GENERATESERIES(1, __Count,1), "__Year",LEFT(PATHITEM(__TableText,[Value]),5), "__Period",RIGHT(PATHITEM(__TableText,[Value]),1) + 0 ) VAR __Result = MAXX(FILTER(__Table,[__Year] = [Year] && [__Period] = [Period]),[Value]) RETURN __Result - 3 years ago
Hi RavM_17 ,
sorry I don´t understand how you have calculated the variance of 150% in your example
- 3 years ago
Hi RavM_17 ,
see my pbi file. I havee added a column [Year Number] in Power Query and then the calculated column [Var] in DAX.
https://1drv.ms/u/s!Aj45jbu0mDVJiz0wZas9jKH1XGrM?e=GhXI2c
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi RavM_17 ,
see my pbi file. I havee added a column [Year Number] in Power Query and then the calculated column [Var] in DAX.
https://1drv.ms/u/s!Aj45jbu0mDVJiz0wZas9jKH1XGrM?e=GhXI2c
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.