The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have a table in power bi which uses the below dax:
need inputs on SQL Query.
powerbi table name: demo,
employee is another table and demo table uses it and KEY IS ALREADY CREATED IN EMPLOYEE TABLE BY CONCATINATING employee'[EMP_CODE]&'employee'[dob]
key=SUMMARIZE( FILTER('employee','employee'[emp_STS]="working"),'employee'[EMP_CODE],'employee'[dob],"Key",'employee'[EMP_CODE]&'employee'[dob]) WORKEDHOURS = CALCULATE(MAX('Employee'[workhrs]), 'Empployee'[NAME]<>BLANK()) employeecode=SUMMARIZE( FILTER('employee','employee'[emp_STS]="working"),'employee'[EMP_CODE],'employee'[dob],"Key",'employee'[EMP_CODE]&'employee'[dob]) employeedob=SUMMARIZE( FILTER('employee','employee'[emp_STS]="working"),'employee'[EMP_CODE],'employee'[dob],"Key",'employee'[EMP_CODE]&'employee'[dob])
corresponding SQL Query I have tried :
select KEY, CASE WHEN NAME IS NOT NULL THEN MAX(HOURS) END AS WORKEDHOURS, EMP_CODE, EMP_DOB from employee where EMP_STS='WORKING' GROUP BY KEY,QC_NAME,DOB,EMP_CODE
Hi @Anonymous ,
What are your requirements and can you provide relevant test data and describe them.
How to Get Your Question Answered Quickly - Microsoft Power BI Community
Looking forward to your reply.
Best Regards,
Henry
User | Count |
---|---|
56 | |
54 | |
53 | |
48 | |
30 |
User | Count |
---|---|
173 | |
89 | |
70 | |
46 | |
45 |