Forum Discussion
medaxing
4 years agoFrequent Visitor
Calculate Measure with two Date Columns
Hi Folks,
I am looking to calcuate M1 where D1 = D2.
Below is the example of the data.
I have tried :
Option1:
VAR _Select = SELECTEDVALUE('CALENDAR'[DATE_FIELD])
Return
SUMX(FILTER('Table','Table'[DATE_FIELD_2] = _Select),'Table'[VALUE_FIELD])
Option2:
Final M1 = CALCULATE('VPT'[M1],
FILTER ('VPT', 'VPT'[D1] = 'VPT'[D2]))
Both didnt work.
Any help is really appreciated.
Thanks in advance.
2 Replies
- amitchandakSuper User
medaxing , A measure like this should work
Final M1 = CALCULATE(sum('VPT'[M1]),FILTER ('VPT', 'VPT'[D1] = 'VPT'[D2]))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.- medaxingFrequent Visitor
Hi
Thanks for the quick response.
As soon as I have SUM in the code then I cant find or select M1.