Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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 |
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 54 | |
| 47 | |
| 38 | |
| 16 | |
| 15 |
| User | Count |
|---|---|
| 81 | |
| 71 | |
| 38 | |
| 28 | |
| 25 |