cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Coming Soon: T-Shirt Design Contest

Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest!

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.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors