Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!View all the Fabric Data Days sessions on demand. View schedule
Hi everyone,
I have a working SQL query that I would like to put into PowerBI. I'm not sure exaclty how to convert SQL to DAX so any help would greatly be appreciated thanks!
SELECT Left(AcademicSemester,3),
AcademicWeek, SUM(Swipe)/COUNT(Distinct AcademicSemester)
as AverageSwipe
FROM
Table
Where AcademicWeek is not NULL
Group BY AcademicWeek, Left(AcademicSemester,3)
Solved! Go to Solution.
@Anonymous ,
You need have a new colum
AcademicSemester new= Left(Table[AcademicSemester],3)
Then put these two on visual AcademicSemester new , Table[AcademicWeek ] as unsummarize
and use this mesure
measure = divide(SUM(Table[Swipe]),Distinctcount(Table[AcademicSemester]))
@Anonymous ,
You need have a new colum
AcademicSemester new= Left(Table[AcademicSemester],3)
Then put these two on visual AcademicSemester new , Table[AcademicWeek ] as unsummarize
and use this mesure
measure = divide(SUM(Table[Swipe]),Distinctcount(Table[AcademicSemester]))
Here is sample data
| AcademicSemester | AcademicWeek | AverageSwipe |
| Spr | 3 | 10,250.5 |
| Fal | 10 | 25,508.6 |
| Sum | 4 | 8,765.8 |
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!