Forum Discussion
Calculating 30 days average based on selected date range in date slicer
- 5 years ago
ckhoo2007 , you need measure bucketing
you need to create a measure
days = datediff(max(table[date]), selecteddate(Date[Date]), day)
or
days =
var _max = maxx(allselected(Date) , Date[Date])
return datediff(max(table[date]), _max, day)
then create an independent table with min, max and bucket
0 , 30, " 0 -30 days"
add others to the table. Use enter data
You need to use this table in new measures, where you need a group level
refer my blog or view for steps
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
ckhoo2007 , you need measure bucketing
you need to create a measure
days = datediff(max(table[date]), selecteddate(Date[Date]), day)
or
days =
var _max = maxx(allselected(Date) , Date[Date])
return datediff(max(table[date]), _max, day)
then create an independent table with min, max and bucket
0 , 30, " 0 -30 days"
add others to the table. Use enter data
You need to use this table in new measures, where you need a group level
refer my blog or view for steps
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
Thanks Amit!