Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Syndicate_Admin
Administrator
Administrator

Parameter does not work by adding to a date

Good morning.

I need to know why this DOES work:

CALCULATE(
[ven01_importe],
DATESINPERIOD(
dCalendario[Date],
NOW()-90,
90,
DAY
)
)
... And yet, this does NOT work:
CALCULATE(
[ven01_importe],
DATESINPERIOD(
dCalendario[Date],
NOW()-[Valor parMesesClientesPerdidos],
[ParMesesClientsPerded Value],
DAY
)
)
... taking into account that the measure [Value parMesesClientesPerded] returns the integer Nº = 90 (checked on a card) and taking into account that it is the result of a PARAMETER. The [Value parMesesPerdents] measure is:
Value parMesesClientsPerded =SELECTEDVALUE('parMesesClientsPerdidos'[parMesesClientesPerdidos])
It only works if the NOW() date subtracts an integer directly, by variable or by a measure, but it DOES NOT WORK if the integer number 90 comes from a PARAMETER.
Would anyone know how to tell me why?
Thank you very much in advance.
Best regards
1 REPLY 1
lbendlin
Super User
Super User

Read about Row context, Filter context, and context transition.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors