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.
Hi everybody!
I'd like to cluster durations, and use them in matrix, bar charts, legends, filters.
These are calculated with DAX. In this way I can only make simple tables (not matrix).
My calculation:
Durations are calculated per each object, that passes different states, as simple subtraction between max_date and min_date.
For example:
ITEM | STATE | DATE |
object 1 | on draft | date |
object 1 | start working | date |
object 1 | finished working | date |
object 1 | dispatched | date |
Duration calculates the total days between last state and first state.
I made automatic clustering, and then can create graphs, but PBI decides the rule and I can't change it.
So I calculated clusters with this simple formula:
How can I produce custom clusters that I can use everywhere?
Is there a way to change automatic clustering?
@Hank_ I believe Duration Cluster you added as a measure and you cannot use it the way you want it. Check this Dynamic Segmentation post and make it work in your model.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Hank_
Your qs How can I produce custom clusters that I can use everywhere? - haven't you already done this with your IF ?
If you have specific clusters/buckets/categrories that you want your data to be assigned to then this is the way I'd approach it.
If you need furhter help please supply some real data that can be worked with.
Regards
Phil
Proud to be a Super User!
Hello Philip, here the link to the pbix https://1drv.ms/u/s!ApBVHbcaAbTVhlXycrEG_MfxEdGe?e=ycB4VF
Hi Philip, yes I made this clustering with DAX but I cannot use it in legend nor axis in a bar chart: I can put it only in tooltip or values if I change clusters to numbers (1, 2, 3 instead of OK, WARNING, LATE).
I will produce a file: I have to change all company data and have dozens of table in my model.
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 |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |