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.
Hi,
I need to create a measure that will SUM a sales value on a selected date, lets say 03/03/2018, then subtract the SUM of this same value on the selected date -1 day.
Any help appreciated.
Hi @Anonymous,
Can you share a sample please? That depends on how you will create your report.
The measure below could help.
Result = VAR lastday = CALCULATE ( SUM ( FactSales[SalesQuantity] ), FILTER ( ALL ( DimDate[Datekey] ), DimDate[Datekey] = MIN ( DimDate[Datekey] ) - 1 ) ) RETURN SUM ( FactSales[SalesQuantity] ) - lastday
Best Regards,
Dale
Thanks for your reply. Unfortunately your solution doesn't perform the subtraction.
For example:
My "SalesQuantity" for 05/03/2018 is -0.03097
My "SalesQuantity" for the proceeding date 02/03/2018 is -0.04047
The above should result in: 0.0095 (-0.03097 - -0.04047) but your measure results in -0.03 when 05/03/2018 is the selected date.
Thanks.
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 |
---|---|
112 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |