Hello, I am trying to write with DAX the following SQL query
I know that case when equivalent is switch statement and group by is summarize but i can't get it work.
selectvideo,sum(case when type=1 then 1 else 0 end) as upvote,sum(case when type=0 then 1 else 0 end) as downvotefrom votesgroup by video
Does anybody know how to do it?
Go to Solution.
You can try using something this below,
Click on New Table under Modelling tab and use the below expression. Replace the column names according to the one present in your dataset.
A new dataset would be created. Drag those columns in a table visual. You will get the output as the adjoining image.
Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.
Register by September 5 to save $200
Check out what's new in the Power BI Community!
Continue your learning in our online communities.