Forum Discussion
var/return
- 6 years ago
Hi Anonymous ,
I am not sure your data structure, you could refer to my sample for details. If this is not what you want, please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
what is the question?
I am trying to use the rankx function
when i try
RANKX( ALL(Table[column1]),
CALCULATE(SUMX(Table, Table[column2]),FILTER(Table,Table[month]))
it gives the contant ranking of 1
except i use 2 different measures
Measure2 = RANKX(ALL( table[column1]), Measure1)
measure1= CALCULATE(SUMX(Table ,Table[Column2),FILTER(Table,Table[month]))
so
i was wonering if its is possible to infuse
- amitchandak6 years ago
Super User
Can you share sample data and sample output.Thanks.
Proud to be a Datanaut My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970 - dax6 years ago
Community Support
Hi Anonymous ,
I am not sure your data structure, you could refer to my sample for details. If this is not what you want, please correct me and inform me more detailed information(such as your expected output and your sample data)? Then I will help you more correctly.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- amitchandak6 years ago
Super User
Anonymous , Hope above solution has worked for you
- PaulDBrown6 years ago
Community Champion
Anonymous
I have seen this recurrenlty, including when using VAR in some instances - and it gets frustrating at times. Unfortunately my knowledge of the intricacies of DAX is insuffucient to provide an adequate answer (we need some help from the DAX gurus).
Some time back, in a thread discussing why VAR clauses sometimes did not deliver the expected result, MattAllington recommended wrapping calculations in VAR clauses in a CALCULATE function. In my exerience, this works sometimes, others the only way I have succeeded in getting the expected result is to unfold the measure into two, as you have done. What's worse is that I often come to this conclusion after spending "hours" trying to understand what is wrong or going on...very frustrating.
As I say, there must be an explanation (which may well be that there is something wrong in the model or my DAX), but it is beyond the scope of my knowledge of the intricacies of the DAX engine.
- Anonymous6 years agoNot applicable
So, let's see if I can GUESS what you want to do...
You have one measure with a CALCULATE inside a RANKX and if you divide the formula in two different measures, they give you different results?
- Anonymous6 years agoNot applicable
Yes, That is correct.