Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Natia
Frequent Visitor

Group the data by semesters in HTML and CSS viewer in Power BI

Hello everyone, I need your help.

I downloaded HTML & CSS viewer in Power BI Desktop and I try to write a DAX code in it. 
I can write a code for semesters and for courses separately but I could not put the courses according to their semesters to show what courses a student have passed in concrete semester. 

I could reach only this visual at this moment using these formulas below:

 

 <tr >
    <td>Course Name</td>
    "CONCATENATEX(DISTINCT('Courses'[Semester ID ]), "<tr> <td ></td> <td align='center'>"'Courses'[Semester ID ],,'Courses'[Semester ID ],ASC)&"
    "&CONCATENATEX(FILTER('Courses','Courses'[Semester ID ]='Courses'[Semester ID ]),"<tr> <td ></td>  <td align='center'>"'Courses'[Course Name ] &"</td> </tr>","",'Courses'[Semester ID ],ASC) &"
  </tr>
 

Natia_0-1682687243866.png

 

I want to achieve this result instead of visual I created above: 
 
 
Natia_1-1682687243867.png

 

 

If it is not enough information here, I can send you a Powe BI example file with mail.

Thank you so much in advance, 

5 REPLIES 5
amitchandak
Super User
Super User

@Natia , Try a measure like

 

CONCATENATEX(SUMMARIZE('Courses', 'Courses'[Semester ID],'Courses'[Course Name ]), " <tr > <td>Course Name</td> <td align='center'>" & 'Courses'[Semester ID ] & "</td> <td align='center'> Course Name </td><td>" & 'Courses'[Course Name ] &"</td> </tr>")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you for your reply, but your code's result is:

irinabazghadze_0-1682701934715.png

I need this result:

irinabazghadze_1-1682702345923.png

so, first of all i need semester id and then subjects

Thank you for your attention.

I and Natia need this tasks solution very much

 

 

I wrote this code:

CONCATENATEX(SUMMARIZE('Courses', 'Courses'[Semester ID ],'Courses'[Course Name ]), " <tr >  <td align='center'>" & 'Courses'[Semester ID ] & "<tr >  <td align='center'>"&  'Courses'[Course Name ] &"</td> </tr></td> </tr>")
and result is:
irinabazghadze_0-1682703357009.png

but i need semester id 38 in group

 

@irinabazghadze , Try like

 

CONCATENATEX(SUMMARIZE('Courses', 'Courses'[Semester ID],'Courses'[Course Name ]), " <tr > <td align='center'>" & 'Courses'[Semester ID ] & "</td> <tr > </tr> <td>" & 'Courses'[Course Name ] &"</td> </tr>")

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

i try it, but result is:

irinabazghadze_0-1682720397318.png

but i need semester id 38 in group (when subject is several)

for example: 

irinabazghadze_1-1682720445516.png

 

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.