Forum Discussion
Create Bins/Groups by Selected Date Slicer
NT2510 , Typically these bins are created on diff like
diff= Datediff(max([Created Date]) , seleteddate(Date[Date]), Day)
Now I can bin this measure. So I can get like 1,3 , 2-6 month etc and have count for that.
Something like this
Measure =
countx(filter(values(Table[Created_date]),diff <=max(Bin[Bin end]) && diff >=max(Bin[Bin start])),Table[ID])
or you need like
Measure =
var _1 = countx(filter(values(Table[Created_date]),diff <=max(Bin[Bin end]) && diff >=max(Bin[Bin start])),Table[ID])
return
Switch ( True (),
_ <=3 , "0-3",
_ <=5 , "3-4",
////And so on
)
So not able to get you when you want bin returned by measure.
Also refer these
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization