Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

analysis by grouping

Hi everyone,

 

I'm wondering if there is a way to use DAX to get an analysis based on a grouped variable. For example, I have two columns: Case # & drug. Each drug in a specific case is a new row but each case has multiple rows because there are multiple drugs in each case. Is there a way to output a single row per case and to show all the drugs for that case in the next column? 

 

Thanks in advance!

  • Hi,

    This measure works

    Measure = CONCATENATEX(VALUES(Data[Drug]),data[drug]," ")

    Hope this helps.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      What my data currently looks like:

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

       

      How I need the data to look:

       

       

       

       

       

       

       

      Thanks!

      • Ashish_Mathur's avatar
        Ashish_Mathur
        Super User

        Hi,

        This measure works

        Measure = CONCATENATEX(VALUES(Data[Drug]),data[drug]," ")

        Hope this helps.