The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi Guys,
can someone help me with getting sum of value of parallel period while using date filter?.
I tried to use the #parallel_period function but I think the Date filttering influnce it.
current table:
I would like to add lParallel_Period_total (last year) column to my matrix.
Solved! Go to Solution.
You could use a calculated measure like this:
Parallel Period = VAR MinDate = MIN ( Date[Column] ) VAR StartDate = DATE ( YEAR ( MinDate ) - 1, MONTH ( MinDate ), DAY ( MinDate ) ) VAR MaxDate = MAX ( Date[Column] ) VAR EndDate = DATE ( YEAR ( MaxDate ) - 1, MONTH ( MaxDate ), DAY ( MaxDate ) ) RETURN CALCULATE ( [Measure], FILTER ( ALL ( DateColumn/Table ), Date[Column] >= StartDate && Date[Column] <= EndDate ) )
Check if the following link helps.
https://www.sqlbi.com/articles/compare-equivalent-periods-in-dax/
You could use a calculated measure like this:
Parallel Period = VAR MinDate = MIN ( Date[Column] ) VAR StartDate = DATE ( YEAR ( MinDate ) - 1, MONTH ( MinDate ), DAY ( MinDate ) ) VAR MaxDate = MAX ( Date[Column] ) VAR EndDate = DATE ( YEAR ( MaxDate ) - 1, MONTH ( MaxDate ), DAY ( MaxDate ) ) RETURN CALCULATE ( [Measure], FILTER ( ALL ( DateColumn/Table ), Date[Column] >= StartDate && Date[Column] <= EndDate ) )