Forum Discussion

kamran's avatar
kamran
Frequent Visitor
7 years ago
Solved

How to extract few columns from a table and apply Group function on them ?

Hi All   My data is as below:   StudentID Name City Main Ethnicity Ethnicity2 Ethnicity3 1741262 F Wellington European Pasifika Māori 2085174 H W...
  • kamran's avatar
    kamran
    7 years ago

    Hi Lin

     

    Thank you so much for your solution and my apologies for such a late response.

    Actually no one replied on my query for first few days so I left to pursue it and found a solution by myself,

    which was interestingly almost similar to yours one, but I created 3 different tables(data sets) using SUMMARIZE and then created union of them in a final dataset.

    Both of these solutions are serving the purpose partially, because, though they calculate the Total Count of students on all Ethnicities, but rest of the Dashboard is not filtered when I click on an individual Ethinicity (for example Chinese) in the table visual.

    I solved this issue as below:

     

    Redesigned the individual datasets, by creating Normalized datasets without duplication as it's the requirement to join two datasets in DAX data model.

    Firstly created a granular dataset which is StudentID in this case, then another Dataset with StudentID and their Ethnicities, 

    and finally linked all datasets with StudentID using One-to-Many and Both directional filtering properties.

    Now, the Count of StudentID is producing the totals and all the visuals are also being filtered mutually.

     

    Thanks again

    Kamran