Forum Discussion
How to create Bins for a Quick Measure?
- 5 years ago
Hi, Anonymous
According to your requirement, I guess that your understanding of the tree map is not very clear. The tree map is used to visually display the proportion of the number of certain members to the whole. If you put this label field in the tree map, It only displays the count of this item you selected. I suggest you use two Card charts to display separately the tag of [Billed Amt] and [TX], and it will visually display tags of the [Account Number] you selected, you can try these measures:
Monthly Billed Amt Bins = var _total_avg=CALCULATE( AVERAGE('Master'[Total_Billed_Amount]),ALLEXCEPT('Master','Master'[Account_Number])) var _result= SWITCH( TRUE(), _total_avg<26,"Up to $25" ,_total_avg<51,"$26-$50" ,_total_avg<76,"$51-$75" ,_total_avg<101,"$76-$100" ,_total_avg<126,"$101-$125" ,_total_avg<151,"$126-$150" ,_total_avg<201,"$151-$200" ,_total_avg<251,"$201-$250" ,_total_avg<301,"$251-$300" ,_total_avg<501,"$301-$500" ,"$501+") return _resultMonthly Transaction Bins = var _total_avg=CALCULATE( AVERAGE('Master'[Total_Units_of_Transaction]),ALLEXCEPT('Master',Master[Account_Number])) var _result= SWITCH( TRUE(), _total_avg<6,"Up to 5 TX" ,_total_avg<11,"6-10 TX" ,_total_avg<21,"11-20 TX" ,_total_avg<41,"21-40 TX" ,_total_avg<61,"41-60 TX" ,_total_avg<81,"61-80 TX" ,_total_avg<101,"81-100 TX" ,_total_avg<121,"101-120 TX" ,_total_avg<201,"121-200 TX" ,"200+ TX") return _resultAnd you can get what you want, like this:
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,
That table looks like your result table. Share the inout table. Also, for each row of the Monthly Transaction Bins for Client ID AAR17105, you want to show 447. Am i correct?
Thanks Ashish_Mathur . Here is the ultimate goal I am trying to accomplish.
When I select an account from the table in the example below, I want that account to show in ONLY one Monthly TX Vol bin, and ONLY in one Monthly Billed Amt bin. Currently, when I select any account, most, if not all, show in multiple bins. In the example screenshot below, highlighted calculations are correct, and should, ultimately, be determining which Monthly TX Vol bin, and which Monthly Billed Amt bin should this account show in.
So, I expect to see AAR17105 in the $501+ and the 200+ TX bins, respectively, and only.
Adding link to the pbix file for review: https://drive.google.com/file/d/1kBKWY6J3NKM9OOx5gZKmocVW-khu6aP4/view?usp=sharing
Thanks for all the help. I really appreciate it.
Asad.
- Ashish_Mathur5 years agoSuper User
Hi,
Follow the Dynamic segmenation technique discussed here - https://www.daxpatterns.com/dynamic-segmentation/. Your method is incirrect because "Monthly Billed Amt Bins" is a calculated column formula in which you have fed a measure as an input. Also, calculated column formulas do not refresh automatically when an item in a filter/slicer is selected.