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 everyone,
I want to make a top 10 list of our customers in terms of weight shipped by air.
However, I am having a problem with the % of weight each customer represents on the total.
Instead of displaying this %, it displays me the % that each customer represents on the TOP 10.
I think my Top N filter is impacting my formula but I don't know how to correct it.
Here is my formula :
% graph bar = sum(Database[Total Weight])/CALCULATE(SUM(Database[Total Weight]), ALL(Database[Name 1]))
Thanks a lot.
Regards,
Solved! Go to Solution.
Try replacing your ALL(Database[Name1]) with
ALLEXCEPT( 'Database', 'Database'[CurrShipmentStart], 'Database'[Shipping type])
Try replacing your ALL(Database[Name1]) with
ALLEXCEPT( 'Database', 'Database'[CurrShipmentStart], 'Database'[Shipping type])
Use Performance Analyzer to get the DAX code generated by your chart. It may be that filters are being applied to other columns on Database in addition to Name1. If so you will need to remove the filters on those columns as well.
It may be enough simply to change ALL(Database[Name1]) to ALL(Database) but I don't know if any other filters are being applied which you need to be honoured, like date for example.
Hi @johnt75 ,
Thanks for your reply.
Indeed, filters have an impact on this visual. There is a date filter and a shipping type filter.
Here is part of the result after using the Performance Analyzer:
// DAX Query
DEFINE
VAR __DS0FilterTable =
TREATAS({"40"}, 'Database'[Shipping type])
VAR __DS0FilterTable2 =
FILTER(
KEEPFILTERS(VALUES('Database'[CurrShipmentStart])),
AND(
'Database'[CurrShipmentStart] >= DATE(2022, 1, 1),
'Database'[CurrShipmentStart] < DATE(2022, 4, 1)
)
)
This visual must allow me to see the total weight shipped only for the top 10 customers with a shipping type "40", hence the importance of filters.
But I would like the % that each customer represents to be calculated on the total weight shipped for all our customers and not the total weight shipped by the top 10.
Is it possible to do this?
Thank you.
Regards,
Ilias
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |