Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Background
My fact table is sales quote history, including sales manager, salesperson, customer number, customer name, quote number, quote version, item number, effective, expiry, quote price, item cost, units sold, dollars sold, etc.
A quote number can have many different quote versions. Example: If quote 123, version 0 has its expiry date changed, a new version will be created: quote 123, version 1. That new version will feature the new expiry date.
Each week we get a new quote file that is uplaoded into our dataset. This file will capture any new quotes/quote versions created, as well as quote usage for that previous week. Each week an item on a quote has usage (dollars sold, units sold), a new row would be created in the file showing that usage. This causes many duplicate rows in our data (duplicate quote number, duplicate item number, duplicate quote quantity, duplicate quote price, etc.). The units sold and dollars sold is never duplicated. To account for duplicated rows, I created a calculated column (ItemQuoteID) which concatenates item number and quote number.
With this in mind, I created a calculated column (Max Revision Indicator) that will indicate whether the item in the row is from the latest version of the quote.
Sales Manager and Salesperson information in my fact table is often incorrect. It's a bug within our quote system. As a result, I have a separate dimension table (Salesperson List) that is related to my fact table using customer number:
Salesperson List (One) -> Data/Fact Table (Many)
My Objective
I have to create measures for GPM % of what was quoted:
Sum of Extended Price-Sum of Extended Cost
Sum of Extended Price
Because I can have many different versions of a particular quote number, when creating this measure, I only want to calculate the GPM quoted for the latest version of the quote. My series of measures are as follows:
The measure seems to work well.
I also have to create a measure for GPM of Items Sold. Because dollar and unit usage can occur over numerous different quote versions, I cannot merely filter by the latest quote version. I have to consider all quote versions. Also have to keep in mind that not all items on a quote have usage.
Here are my series of measures:
I know that I can merely set a filter for Quote GPM to 'Is Not Blank' and it fixes the issue in my visualization, but I'm concerned that my measures could stand to be improved to fix this issue. I want my measures to work in a way that is not negatively impacting relationships with my dimension tables.
I think the cause may be the relationship between tables. Try modifying the relationship's cross-filter direction from Single to Both between Data (Customer Number) and Salesperson Table (Customer Number). Let me know if this works.
Regards,
Community Support Team _ Jing Zhang
Source.Name,Quote Number,Effective Date,Expiration Date,Item Number,Quote Quantity,Total Quote Units Sold, Extended Price ,Total Quote Dollars Sold,Quote Price,Quote Version,Item Cost,MPG,ItemQuoteID,Max Revision Indicator,Extended Quote Cost
QuotesLink30Jan-6Feb.txt,100164737,1/1/2021,6/30/2021,Test Item,50,0,$405.00 ,0,8.1,3,1.3981537,73,Test Item100164737,1,69.907685
QuotesLink10-16Jan_2.txt,100164737,1/1/2021,6/30/2021,Test Item,50,0,$405.00 ,0,8.1,1,1.3981537,73,Test Item100164737,0,69.907685
QuotesLink03-09Jan.txt,100164737,1/1/2021,6/30/2021,Test Item,50,0,$405.00 ,0,8.1,0,1.3981537,73,Test Item100164737,0,69.907685
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |