Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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 |
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |