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 Guys,
I need to calculate the sales per month between 2 dates, I created in the calendar table two columns with the maximum date and the minimum date, I also created a measure with the datebetween function with the dates but the result is the accumulated sales and it should be shown per month .
any suggestions, thanks guys.
Solved! Go to Solution.
Does it do what you expect if you use KEEPFILTERS to prevent DATESBETWEEN from overriding the month?
Saldo =
VAR INI = SELECTEDVALUE ( CALENDARIO[INICIO_HISTORICO] )
VAR FIN = SELECTEDVALUE ( CALENDARIO[FIN_HISTORICO] )
RETURN
CALCULATE (
[Saldo_Prom],
KEEPFILTERS ( DATESBETWEEN ( CALENDARIO[Date], INI, FIN ) )
)
Does it do what you expect if you use KEEPFILTERS to prevent DATESBETWEEN from overriding the month?
Saldo =
VAR INI = SELECTEDVALUE ( CALENDARIO[INICIO_HISTORICO] )
VAR FIN = SELECTEDVALUE ( CALENDARIO[FIN_HISTORICO] )
RETURN
CALCULATE (
[Saldo_Prom],
KEEPFILTERS ( DATESBETWEEN ( CALENDARIO[Date], INI, FIN ) )
)
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 |
---|---|
43 | |
21 | |
20 | |
15 | |
13 |
User | Count |
---|---|
45 | |
41 | |
39 | |
19 | |
19 |