cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MisterFry Frequent Visitor
Frequent Visitor

Chart by rank of measure

Hey All,

 

What I want is to rank products based on a sales metric, and display that metric, sorted ascending by rank on a continuous axis. 

 

The catch is that the fact table is at a lower intersectionality than my desired summary, and I need that summary to be reactive to selections made in slicers in the interface. 

 

More practically, I have a table of Sales. Sales are associated to stores, products, and a calendar (by weeks).

I want to chart, by Product 

The RANK of:

Productivity = CALCULATE(SUM(Sales)/DISTICTCOUNT(Stores), 'Product'[SomeFlag] = "Something")  along the X (horizontal) axis

and 

Productivity = CALCULATE(SUM(Sales)/DISTICTCOUNT(Stores), 'Product'[SomeFlag] = "Something")  along the Y 

 

I've managed to achieve this by creating a table: 

Productivity =
SUMMARIZE('Fact Data'
,'Fact Data'[Product.ID]
,"Avg Sales per Store", DIVIDE([Sum Tot Sls Rtl],[Store Count])
)
and then creating a calculated column 
Avg Sales Rank = RANKX('Productivity', 'Productivity'[Avg Sales per Store])
 
What it does NOT do, which I need it to, is recalculate the summarized data based on the filter context applied to the fact table. I feel like this should be a relatively simple thing to do... but I can't seem to figure it out. 
 
Bonus points if you can help me make it display a line for more than one week. 
 
Thanks!
-R
1 ACCEPTED SOLUTION

Accepted Solutions
MisterFry Frequent Visitor
Frequent Visitor

Re: Chart by rank of measure

Unfortunately, I'm not able to share my data, or a subset of my data. 

 

I wrote my visualization in R instead. 

View solution in original post

2 REPLIES 2
Community Support Team
Community Support Team

Re: Chart by rank of measure

Hi MiserFry

 

It is hard to understand the measure without sample data, so if possible, could you please inform me more detailed information(such as your fact  table and product table)? And if you want to sort chart by measure or column’s result, you could try to use below step:

73.png

Best Regards,

Zoe Zhi

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MisterFry Frequent Visitor
Frequent Visitor

Re: Chart by rank of measure

Unfortunately, I'm not able to share my data, or a subset of my data. 

 

I wrote my visualization in R instead. 

View solution in original post

Helpful resources

Announcements
New Kudos Received Badges Coming

New Kudos Received Badges Coming

Kudos to you if you earned one of these! Check your inbox for a notification.

Microsoft Implementation for Communities Wins Award

Microsoft Implementation for Communities Wins Award

Learn about the award-winning innovation that was implemented across Microsoft’s Business Applications Communities.

Power Platform World Tour

Power Platform World Tour

Find out where you can attend!

Top Kudoed Authors (Last 30 Days)
Users online (1,089)