Forum Discussion

darko861's avatar
darko861
Icon for Resolver II rankResolver II
5 years ago
Solved

Group and Count with DAX

Hi,

I have the following query in SQL server that I would like to recreate in Power bi with DAX. How can I create a measure or table with his query. Thank you very much.

 

[v_rpt_Service].[status_description] AS 'Label', COUNT([v_rpt_Service].[SR_Service_RecID]) AS 'Value'
FROM [v_rpt_Service]
WHERE ([v_rpt_Service].[Closed_Flag] = 0)
GROUP BY [v_rpt_Service].[status_description]
ORDER BY COUNT([v_rpt_Service].[SR_Service_RecID]) DESC;

 

LabelValue
Analyzing409
Waiting On Customer: User Acceptance95
Customer has updated89
Waiting On Customer: More Info72
On Hold67
Analyzing (Third line)65
Creating solution49
Waiting On Customer: Approve Estimate49
Internal45
Delivered27
Recieved22
Waiting for build19
Assigned18
*New16
Not Assigned15
Estimating14
Waiting On Development10
Testing solution9
Ongoing9
Re-Opened3
*Assigned1

5 Replies