The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
So I have a snapshot table and to get the latest total amount I am using the following:
Amount = sum(amount_raw)
Current Amount =
var maxdate =MAX('report'[Snapshot date])
return
CALCULATE(
[Amount],'report'[Snapshot date] >= maxdate )
My table is as follow:
snapshot date | Amount | Material | Group |
18/10/2020 | 2 | 100101 | Plastics |
18/10/2020 | 5 | 200213 | Wood |
20/10/2020 | 3 | 50323 | Copper |
20/10/2020 | 4 | 353043 | Latex |
20/10/2020 | 4 | 123123 | Latex |
20/10/2020 | 4 | 1232 | Latex |
So I create a matrix table that has 2 levels, group and Material. Group is fine but once I drilldown into material, I am getting the total for all dates
Any ideas on how to fix the issue? thank you!
Solved! Go to Solution.
Solution was to get the max date of the entire table.
Var maxdate =calculate(max(date),all(table))
Solution was to get the max date of the entire table.
Var maxdate =calculate(max(date),all(table))
User | Count |
---|---|
80 | |
78 | |
37 | |
34 | |
31 |
User | Count |
---|---|
93 | |
81 | |
60 | |
49 | |
49 |