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,
In my database I have sales by months and products. But not every months I sell same products
For example:
January
Products: A, B, C
February:
Products: B, C
In my graphic of accumulated sales in February only show products B and C, in order to I dont have the row of product A
My current formula is:
CALCULATE (
SUM ( Sales[sales] );
FILTER (
Sales;
Sales[Month-Year] <= EARLIER ( Sales[Month-Year] )
&& YEAR ( Sales[Month-Year] ) = YEAR ( EARLIER ( Sales[Month-Year] ) )
&& Sales[prducts] = EARLIER ( Sales[products] )
)
)
)
Any idea?
Solved! Go to Solution.
Hi,
If in Feb, you only want to see the accumulated sales of B and C (not A because this product did not see in Feb), then follow this process:
Total Sales = SUM(Sales[sales])
Accumulated Sales = IF(ISBLANK([Total Sales]),BLANK(),CALCULATE([Total Sales],DATESYTD(Calendar[Date],"31/12")))
Drag the Accumulated Sales measure to your visual.
Hope this helps.
Hi,
If in Feb, you only want to see the accumulated sales of B and C (not A because this product did not see in Feb), then follow this process:
Total Sales = SUM(Sales[sales])
Accumulated Sales = IF(ISBLANK([Total Sales]),BLANK(),CALCULATE([Total Sales],DATESYTD(Calendar[Date],"31/12")))
Drag the Accumulated Sales measure to your visual.
Hope this helps.
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 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |