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,
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 ) )
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 |
---|---|
105 | |
105 | |
87 | |
73 | |
66 |
User | Count |
---|---|
122 | |
112 | |
98 | |
79 | |
72 |