Forum Discussion

Natia's avatar
Natia
Frequent Visitor
3 years ago

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>
 

 

I want to achieve this result instead of visual I created above: 
 
 

 

 

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

  • 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>")

    • irinabazghadze's avatar
      irinabazghadze
      Frequent Visitor

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

      I need this result:

      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

       

       

      • irinabazghadze's avatar
        irinabazghadze
        Frequent Visitor

        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:

        but i need semester id 38 in group