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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
krishnavzm123
Regular Visitor

How to transform the excel input into a summary table

Hi Team,

I'm new to Power BI and getting input in below format.

Class                              Colour              Count

Class1Orange4
Class1Orange6
Class1Red5
Class2Blue4
Class2Yellow6
Class2Blue2

 

from the above I'm planning to generate a new table but not sure how can i achieve. Can you guide me how can i generate a summary table like below ,

and also

if i need to use Mesaure can you tell me how i can compare the class , colour to get the abg count?

Class                     Colour      Avg count

Class1Orange5
Class1Red5
Class2Blue3
Class2Yellow6
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @krishnavzm123,

It sounds like a common measure expression calculate with multiple aggregates requirements.

If that is the case, you can create a measure formula with summarize function to aggregate and use iterator function AVERAGEX get the average of count of records.

formual =
AVERAGEX (
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Class],
        [Colour],
        "cColor", COUNTA ( Table[Colour] )
    ),
    [cColor]
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

Hi @krishnavzm123,

It sounds like a common measure expression calculate with multiple aggregates requirements.

If that is the case, you can create a measure formula with summarize function to aggregate and use iterator function AVERAGEX get the average of count of records.

formual =
AVERAGEX (
    SUMMARIZE (
        ALLSELECTED ( Table ),
        [Class],
        [Colour],
        "cColor", COUNTA ( Table[Colour] )
    ),
    [cColor]
)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.