Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Grouping Items

Hi guys, thank you again for your help!

A bloody beginner, I have another question.

 

I would like to illustrate revenues that are associated with ICD codes. These codes are structured in the following way

 

A00-B99: Certain infectious and parasitic diseases

A00-A09: Intestial infectious diseases

A00: Cholera

A00.0 Cholera due to X

A00.1 Cholera due to Y

A01: Typhoid and paratyphoid fevers

A01.0 Typhoid fever

A01.1 Paratyphoid fever A

A01.2 Paratyphoid fever B

A01.3 Paratyphoid fever C

(.....)

C00-D48: Neoplasms 

(.....)

 

 

Problem is, my table contains thousands of ICD10 Codes (see screenshot below) on different hierarchies and I would like to group these ICD10 codes according to the three highest hierarchy levels (marked in red, blue and green in the above extract). Does anyone know how to achieve this?

THanks so much!

 

 

 

  • edhans's avatar
    edhans
    6 years ago

    Hi Anonymous , 
    That really doesn't help me too much, but only because I do not understand your data. You are saying that is different heirarchies in one column, but I can only possibly make out 2, and may be guessing wrong at that.

    You are going to have to reshape your data so there is a key at the lowest level in your FACT table, then use your DIM table to slice however you want. I created this dummy DIM table:

    Then I took your original table, and merged it to level 1, 2, and 3 and expanded the Level one amount. It returned NULL for all but one of those merges, so then I did a "merge columns" on those levels. It now looks like this:

    Then you would create a 1-Many relationship between the L1 field of the DIM table to the L1 field of the FACT table. See my PBIX attached.

    If you need further help, you are going to have to provide a more comprehensive sample of data and explain the multiple leves and how your business defines those. But you must work this into a Start Schema as I have, or you will continue to hit dead ends in visuals and DAX measures.


    Microsoft Guidance on Importance of Star Schema

     

5 Replies