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.
Hey there,
I have a dataset that looks at tasks created and completed over time, and have created a chart to show issues created by month.
However, instead, I want to change this to a histogram and group into different age bins of "Created in the last month", "created 2 months ago" ... "created 5 months ago" and "created 6+ months ago" I have created a column called Age which takes (today's date - created date) to give the age in days. I now just need to somehow create these bins as the inbuilt bin creation functionality will not allow me to do this.
Solved! Go to Solution.
@Anonymous , In your date table that joined with the created date you can have a column like this
Switch( True(),
eomonth([Date],0) >= eomonth(Today(),-1),"Created Last Month" ,
eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
eomonth([Date],0) >= eomonth(Today(),-2),"Created 2 Month3 ago" ,
eomonth([Date],0) >= eomonth(Today(),-3),"Created 3 Month3 ago" ,
eomonth([Date],0) >= eomonth(Today(),-4),"Created 3 Month4 ago" ,
/// keep on adding
Format([Date],"MMM-YYYY")
)
Or refer
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
@Anonymous , In your date table that joined with the created date you can have a column like this
Switch( True(),
eomonth([Date],0) >= eomonth(Today(),-1),"Created Last Month" ,
eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
eomonth([Date],0) >= eomonth(Today(),-2),"Created 2 Month3 ago" ,
eomonth([Date],0) >= eomonth(Today(),-3),"Created 3 Month3 ago" ,
eomonth([Date],0) >= eomonth(Today(),-4),"Created 3 Month4 ago" ,
/// keep on adding
Format([Date],"MMM-YYYY")
)
Or refer
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
Hi @Anonymous ,
You can try this
https://community.powerbi.com/t5/Desktop/Grouping-by-age/td-p/208263
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
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 |
---|---|
115 | |
100 | |
88 | |
70 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |