Forum Discussion
Jensej
5 years agoHelper V
SQL into Dax
Hello!
I have a table in Power Bi with a Month Column Jan-Dec for year 2020. Now i want to a second column that shows the people who resigned in that month.
In sql i would solve it like this but i don't know if it would work if just create a measure and i don't know the dax code for it.
Can someone help with the dax code for this select?
SELECT Name + CAST(day(Resign_Date) as varchar) as Name FROM BI_Adr
WHERE Entry_Date <= GETDATE() and Resign_Date > GETDATE()
7 Replies
- amitchandakSuper User
Jensej , In a table visual take name, Resign_Date and this measure
measure =calculate(countrows(Table), filter(Table, Table[Entry_Date] <=Today() && Table[Resign_Date] >=Today()))
- JensejHelper V
HI amitchandak
Thanks for your reply, if i do this i get this error message in the table visual. "A table of multiple values was supplied where a single value was expected"
- amitchandakSuper User
Jensej , Can you share your measure