Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
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.
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
91 | |
86 | |
76 | |
66 |
User | Count |
---|---|
149 | |
117 | |
111 | |
106 | |
95 |