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.
I have a stacked column chart that summarizes the invoiced hours (y-axis), with customers as column series (legend), over time (x-axis)
Shared Axis: DimTime.MonthName
Column Series: DimCustomers.CustomerName
Column Values: FactInvoiced.InvoicedHours
The sorting horizontally is fine, January, February, etc. Because I've sorted the MonthName column by the MonthNumber column I also have available. The problem is the vertical sorting in the stacks of the column chart. I need to sort the customers based on how many invoiced hours there are on them so that the customer with the most hours is at the bottom of the column and then smaller and smaller as we go up the bar.
This is the formula I've used to create the calculated ranking column:
= RANKX(ALLSELECTED(DimCustomers);SUMX(RELATEDTABLE(FactInvoiced);FactInvoiced[Invoiced Hours]))
This works but it doesn't adapt to filtering I do on the FactInvoiced table. So when I want to see the ranking of customers but what it looks like when I filter on one of the employees in our company and the customers she has worked at, the ranking doesnt changed based on now narrower scope.
Do I need some form of relational filter in my DAX?
Hi @apollnor
Give this a shot please
= RANKX ( ALLSELECTED ( DimCustomers[CustomerName] ); SUMX ( RELATEDTABLE ( FactInvoiced ); FactInvoiced[Invoiced Hours] ) )
Gives an error regarding circular dependecy.
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 |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |