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.
I want to calculate the target number based on the date slicer.
For example, the date range selected is 1st May 2018-23rd June 2018, then the output should be 1st May 2018-31st May 2018 + 1st June 2018-30th June 2018).
Likewise, if the date range selected is 1st March 2018-10th March 2018, the output should be the target of 1st March 2018-31st March 2018.
I have created a measure but it is only considering it for the current month-
revenue target = CALCULATE(SUM(data[targettarget]),MONTH('data'[date])=MONTH(TODAY()))
So when I change the date range to May, I can still see only the values for June.
Kindly guide.
Solved! Go to Solution.
try this
revenue target:=CALCULATE(SUM(data[targettarget]),PARALLELPERIOD(data[date],0,MONTH))
Hi @aJ2,
You need a calendar table which is unrelated to data table, generateed by CALENDAR() function.
revenue target = CALCULATE ( SUM ( data[targettarget] ), MONTH ( 'data'[date] ) >= MONTH ( MIN ( calendar[dates] ) ) && MONTH ( 'data'[date] ) <= MONTH ( MAX ( calendar[dates] ) ) )
Best regards,
Yuliana Gu
Hi @aJ2,
You need a calendar table which is unrelated to data table, generateed by CALENDAR() function.
revenue target = CALCULATE ( SUM ( data[targettarget] ), MONTH ( 'data'[date] ) >= MONTH ( MIN ( calendar[dates] ) ) && MONTH ( 'data'[date] ) <= MONTH ( MAX ( calendar[dates] ) ) )
Best regards,
Yuliana Gu
try this
revenue target:=CALCULATE(SUM(data[targettarget]),PARALLELPERIOD(data[date],0,MONTH))
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 |
---|---|
114 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |