Forum Discussion
ToNo87
9 years agoRegular Visitor
Get value from a field based on another field
I have a table something like this Value | Datetime (date) 2 12/12/2016 3 12/12/2016 2 12/12/2016 2 12/12/2016 4 12/12/2016 2 12/14/201...
PavelR
Solution Specialist
9 years agoHi ToNo87
create measure like
Distinctcount M-1 = CALCULATE(DISTINCTCOUNT(Table1[Value]);DATEADD(Table1[Date];-1;MONTH))
Regrds.
Pavel
- ToNo879 years agoRegular Visitor
I'm getting a warning that says "The syntax for ';' is incorrect. " (I am using Power BI Desktop). :)
- PavelR9 years ago
Solution Specialist
It works fine. Maybe that when you have edited the formula you have also removed some bracket or something.
Regards.
Pavel
- ToNo879 years agoRegular Visitor
Thanks PavelR
This is the error message I got:
The syntax for ';' is incorrect. (DAX(CALCULATE(DISTINCTCOUNT(Data[Value]);DATEADD(Data[Time];-1;MONTH)))).
this is the measure I added:
Distinctcount -1 = CALCULATE(DISTINCTCOUNT(Data[Value]);DATEADD(Data[Time];-1;MONTH))
Note that Data[Value] is hash id (text) and Data[Time] is date/time if that matters.