Forum Discussion
Mobile or dynamic quarters
- Anonymous5 years ago
Hi Anonymous ,
Here are the steps you can follow:
1. Enter power query through transform data and select add column --- index column --- from 1 to generate the index
2. Create calculated column.
Quarter = var _mod=MOD([Index],3) return SWITCH( TRUE(), _mod=1,CALCULATE(MAX([Month]),FILTER('Table',[Index]=EARLIER([Index])+2)), _mod=2,CALCULATE(MAX([Month]),FILTER('Table',[Index]=EARLIER([Index])+1)), _mod=0,[Month])2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Here are the steps you can follow:
1. Enter power query through transform data and select add column --- index column --- from 1 to generate the index
2. Create calculated column.
Quarter =
var _mod=MOD([Index],3)
return
SWITCH(
TRUE(),
_mod=1,CALCULATE(MAX([Month]),FILTER('Table',[Index]=EARLIER([Index])+2)),
_mod=2,CALCULATE(MAX([Month]),FILTER('Table',[Index]=EARLIER([Index])+1)),
_mod=0,[Month])2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.