Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply

Total sales measure based on ranking locations

Hello everyone, looking for help.

 

I have created a sum of sales (measure), a range (measure) based on total sales per customer.

I created a DimRank table, basically the rating index 1,2,3,4..., Rank buckets 1-100,101-200.... , is an unplpled table.

 

I'm trying to create a range cube table, sum of sales within each bucket. I have created Measure 3, which allocates the total sum of sales within each bucket (depending on the customer's range).

 

 
Range measurement (I have used all() and allselected(), which give me the same result)
is based on each individual's contriction on the total amount of sales.
 

My resulting table shows the following, which looks at first glance because the range of customers is maintained and their expense amount is allocated to the correct bucket. However, when I delete ID, the range becomes 1, Bucket displays 1-100 (presumably because everyone (as a group) changes to range 1):

 

Incorrect result (I had to filter the client ID in the filter pane):

However, Measure 3 gives me the total (correct) amount of sales (for the 2 customers I have filtered).

Data model below:

 

Any help is highly appreciated.

 

(added more information on 07/09/2020)

2 REPLIES 2
Greg_Deckler
Super User
Super User

@PerAsperaAdAstr - See if this helps. https://community.powerbi.com/t5/Quick-Measures-Gallery/To-Bleep-with-RANKX/m-p/1042520#M452

 

Otherwise, Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors