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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

Top Solution Authors
Users online (1,940)