The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 ) )
)
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
19 | |
18 | |
15 | |
11 |
User | Count |
---|---|
35 | |
34 | |
19 | |
19 | |
14 |