Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi, I have hierarchical date slicer that shows date as Year->Quarter->Month (Table1[Created Date]).
On X-axis, I have month count calculated as 'Table1[Created Date] - Date(2014,1,1). So, month count is 1,2,3...12,13,14...till current month. Now, based on the date selected in slicer, I want to generate different Month count bins on x-axis such that first bin always starts with month selected in the slicer and all other bins should show current month count + 12.
Here are some examples:
Created Date | Bin1 | Bin2 | Bin3 |
2/1/2020 | 0-2 | 2-14. | 14-26. |
4/1/2020 | 0-4 | 4-16. | 16-28. |
7/1/2020 | 0-7 | 7-19. | 19-31 |
I was able to create bins using calculated column but they wont dynamically change based on the slicer selected date/month.
Any help would be appreciated. Thanks
@NT2510 You would have to create your bins as measures. Then you would most likely need to use the disconnected table trick in some fashion, not exactly clear on your requirements though.
Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
I am newbie and not sure how to upload file directly.
Here is the expected output. Date filter can be selected for multiple dates but I want only MAX(Month(Created Date)) which will be used for 1st bin.
Currently I have hardcoded max value as "5" hence 1st bin starts with 5. My only problem is, how I can pass Max of Created Date to calculated column or measure. I tried selectedvalue but it does not pass Max value instead all values.
Is there any way I can get Max value to pass so that bins can dynamically created.
Thanks
@NT2510 , You can upload to onedrive or drop box and share link
@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-po...
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
85 | |
84 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
97 | |
71 | |
67 |