Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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 ) )
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |