Forum Discussion
Rank Based on Selected Data from Scatterplot
- Anonymous2 years ago
Hi user01 ,
Ashish_Mathur mentioned the relationships , and I will continue to add to it later in this section:
Below is my table1:
Below is my table2:
The following DAX might work for you:
Rank asum = VAR SelectedOptions = SELECTEDVALUE('asum'[Option]) RETURN RANKX( ALLSELECTED('asum'), CALCULATE(MAX('asum'[Option])), , ASC, DENSE ) Rank po = VAR SelectedOptions = SELECTEDVALUE('po'[Option]) RETURN RANKX( ALLSELECTED('po'), CALCULATE(MAX('po'[Option])), , ASC, DENSE )The final output is shown in the following figure:
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sorry for being unclear. It is asum Option (one) to po Option (many). The SQL Server has all the data, but I just query one ID (eg. ID = 5) into Power Bi via Direct Query. So asum[Option] looks like it has no duplicates.
Your reply does not answer my question.
- user012 years agoResolver I
Hi Ashish, Sorry for the confusion. I am using the Option column from both tables as 1:Many. I only have loaded the subsets where ID = 5. So there are no duplicates from in asum[Option]. Can we pretend ID = 4 does not exist?
- Ashish_Mathur2 years agoSuper User
I do not understand your question/data at all. Someone who does will help you.