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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

summarize to groupby

Hi,
How can the below DAX use groupby instead of summarize please?

SUMMARIZE (
'TablePH',
'TableP'[Field1],
'TableP'[Field3],
"CountOfCountries", DISTINCTCOUNT ( 'Table6'[Country] ),
"Hours", [Time]
)

1 ACCEPTED SOLUTION
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Please see the below.

 

Measure = 
ADDCOLUMNS( 
    GROUPBY(
        'TablePH',
        'TableP'[Field1],
        'TableP'[Field3],
        "CountOfCountries", COUNTX( CURRENTGROUP(), DISTINCT( 'Table6'[Country] ) )
    ),
    "Hours", [Time]
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

View solution in original post

3 REPLIES 3
Mariusz
Community Champion
Community Champion

Hi @Anonymous 

 

Please see the below.

 

Measure = 
ADDCOLUMNS( 
    GROUPBY(
        'TablePH',
        'TableP'[Field1],
        'TableP'[Field3],
        "CountOfCountries", COUNTX( CURRENTGROUP(), DISTINCT( 'Table6'[Country] ) )
    ),
    "Hours", [Time]
)

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
Mariusz Repczynski

 

Anonymous
Not applicable

thank you

Hi @Anonymous 

No problem, happy to help!

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.