The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello 🙂
I'm working with the Rankx function to rank stores by marge but it's jump by one when i have a negative value, exemple :
NB : the column Store from the table T_Stores and the measure Marge from another table T_Sales.
Store Marge Rank
A 50 % 1
B 26 % 2
C 18 % 3
D - 12% 5
E - 8 % 6
My formula is :
Hi @Anonymous ,
could you share a screenshot of your data model?
Regards,
Marcus
Dortmund - Germany
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hello @mwegener , thank you for your response but i'm sorry i can't share the data model it's large and for confidentiality reason
Hi @Anonymous ,
however, you must at least describe your existing measure and how the columns & tables are related so that help can be provided.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
I have two tables 'CA' and 'Point de vente' with cardinality (*:1) to the CA table which contain the CA_TTC measure.
CA__TTC = Sum(MNT_TTC)
CA Point de vente
Id_PDV (*) <--------------------- (1) Id_PDV
Hi @Anonymous ,
is your problem solved?
If I answered your question, please mark my post as solution, this will also help others.
Please give Kudos for support.
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Hi @Anonymous ,
try this
RanK = RANKX(ALLSELECTED('Point de vente'[Code Point de vente]);[CA__TTC];;DESC;Dense)
I think "id_PDV" and "Code Point de vente" have a *: 1 relationship
Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials
Refer
https://community.powerbi.com/t5/Desktop/wrong-rank-in-negative-values/td-p/262113
or try like
Rank = RANKX(ALLSELECTED(store),[Marge],,ASC,Dense)
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
My formula is : RANKX(ALL(T_STORES);T_SALES[Marge];;;Dense)
I'm not sure I follow exactly but using this formula is working fine for me...
User | Count |
---|---|
69 | |
64 | |
62 | |
55 | |
28 |
User | Count |
---|---|
203 | |
82 | |
65 | |
48 | |
38 |