Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
The Bin type group uses min/max of the data as the begin/end of the bin.
Can I use dynamic value for example slicer selected start and end month for the bin?
e.g.
Start month: Feb20
End month : Oct20
Bin: 3 months
Bin 1: Feb20-Apr20
Bin 2: May20-Jul20
Bin 3: Aug20-Oct20
Hi, @Anonymous
According to your description, I think you don’t need to use a bin to achieve this, you can use measure, you can try my steps:
Date = CALENDARAUTO()
total sales in 3 months block =
var _selectedmonth=MONTH(MIN('Date'[Date]))
return
CALCULATE(
SUM(Sales[Amount]),
FILTER('Sales',
MONTH([Date])>=_selectedmonth&&MONTH([Date])<=_selectedmonth+2))
And you can get what you want.
You can download my test pbix file here
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you. What I want to achieve is to have the time axis in 3 months group, depends on the start month on slicer. The group/bin function does not work dynamically.
Hi, @Anonymous
In my opinion, you can not achieve it through DAX, because the calculated column/table can not be created by the selected value of Slicer, so you have to use measure. Unfortunately, you can’t use the measure to perform as the axis or legend of a column chart, so I think you can not achieve this if you want to use Slicer.
More info about dynamic binning and grouping:
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
In my opinion, the purpose of designing the “bin and group” is to display your data with the desired unit(like 3 months). If you use it with the Slicer, it is already dynamic. What’s more, you can not change the Max value and Min value of the bin group, it’s set according to the field you selected.
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Agree with you. The reason I need this is to display the total sales in 3 months block ( and display the month on axis), starting with month selected in the slicer.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |