Forum Discussion
Anonymous
5 years agoNot applicable
DAX help needed
Hi Power Users, I'm still learning powerbi. I need help in getting below sql query write in power bi using dax. select sum(Monthcount), sum(Monthcount)/12 from (select indexid, count(distinc...
amitchandak
Super User
5 years agoAnonymous , You can have measures like this
sumx(values('Table-1'[indexid]), distinctcount('Table-1'[indexid]))
sumx(values('Table-1'[indexid]), distinctcount('Table-1'[MonthID]))
sumx(values('Table-1'[indexid]), distinctcount('Table-1'[MonthID]))/12
Both Tables should join on MonthID in power BI and where you can take filter in the slicer
You can refer my Dax vs SQL series, if that can help https://www.youtube.com/watch?v=WlvQ_SGy4iA&list=PLPaNVDMhUXGZNyKU0PgG2g3P0c6CPjMnj