cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
fmbg Member
Member

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

Accepted Solutions
Super User IV
Super User IV

Re: summarize to groupby

Hi @fmbg 

 

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
Super User IV
Super User IV

Re: summarize to groupby

Hi @fmbg 

 

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

fmbg Member
Member

Re: summarize to groupby

thank you

Super User IV
Super User IV

Re: summarize to groupby

Hi @fmbg 

No problem, happy to help!

 

Best Regards,
Mariusz

Please feel free to connect with me.
Mariusz Repczynski

 

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors