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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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 |
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 64 | |
| 47 | |
| 41 | |
| 36 | |
| 23 |
| User | Count |
|---|---|
| 185 | |
| 123 | |
| 106 | |
| 78 | |
| 52 |