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.
I am having trouble finding a solution to displaying units sold based on last date in a date column. For example: I have a data set that includes Trust Symbol, Date Sold, Manufacture, and Units Sold. I want to display the # of units sold by trust symbol for the last date in the dated sold column. I included an example of the data set. I dont want to use a date filter. I want the report to automatically show the # of units sold by trust. Based on the data set below I would want the report to display Trust 1 sold 700 units, Trust 2 sold 50 units, and Trust 3 sold 4 units. All other dates should be ignored. Any help would be appreciated.
TrustSymbol | Date Sold | Manufacture | Units Sold |
Trust 1 | 10/16/2017 0:00 | Red | 500 |
Trust 1 | 10/16/2017 0:00 | Orange | 200 |
Trust 2 | 10/16/2017 0:00 | Yellow | 50 |
Trust 3 | 10/16/2017 0:00 | Green | 4 |
Trust A | 10/10/2017 0:00 | White | 825 |
Trust 2 | 10/10/2017 0:00 | Purple | 65 |
Trust 3 | 10/6/2017 0:00 | Dash | 2 |
Trust 4 | 10/3/2017 0:00 | Light Green | 200 |
Trust 1 | 9/25/2017 0:00 | Magenta | 125 |
Trust b | 9/20/2017 0:00 | Corn | 6 |
I want the ability to display the following since 10/16 is the last date in the date sold column.
Trust Symbo | Units Sold |
Trust 1 | 700 |
Trust 2 | 50 |
Trust 3 | 4 |
Solved! Go to Solution.
Hi, Try with this measure:
UnitsSold-LastDate = CALCULATE ( SUM ( Table1[Units Sold] ), FILTER ( Table1, Table1[Date Sold] = CALCULATE ( LASTDATE ( Table1[Date Sold] ), ALL ( Table1 ) ) ) )
Regards
Victor
Lima - Peru
Hi, Try with this measure:
UnitsSold-LastDate = CALCULATE ( SUM ( Table1[Units Sold] ), FILTER ( Table1, Table1[Date Sold] = CALCULATE ( LASTDATE ( Table1[Date Sold] ), ALL ( Table1 ) ) ) )
Regards
Victor
Lima - Peru
Thank you!! Saved me a lot of time and grief.
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |