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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GJE
Frequent Visitor

[HELP] I can't group elements of a table

Basically I need to summarize the articles and for them the time columns must be added based on the article and the NumberT column becomes a counter where if I have two lines for the same article whose NumberT is different, the result would be 2.

 

I will summarize it with the following view, I hope it is understood.

I have the following table:

ArticleTimeTCountTimeTONumberT
105021
1010022
202021
306025
209021


And I need it to display like this:

ArticleTimeTCountTimeTONumberT
101502
201101
30601

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @GJE ,
Based on the information you have provided, you can follow the steps below:
Add new measure:

Count_ = 
CALCULATE (
    SUM ( 'Table'[Count] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Article] = SELECTEDVALUE ( 'Table'[Article] )
    )
)
NumberT_ =
COUNTROWS ( SUMMARIZE ( 'Table', 'Table'[Article], 'Table'[NumberT] ) )

Final output:

vyifanwmsft_0-1706682364546.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
GJE
Frequent Visitor

Excuse me @Anonymous @Ashish_Mathur  @ryan_mayu  @jdbuchanan71 

 

Just one more question related to this same scenario. The TimeTO and TimeT columns are in HOUR format, so the SUM of them gets stuck at 23:59:59. I tried to change it but no luck.

 

What can I do in this situation?

GJE
Frequent Visitor

Guys, thank you very much!! I found all your answers very useful. ❤️

Anonymous
Not applicable

Hi @GJE ,
Based on the information you have provided, you can follow the steps below:
Add new measure:

Count_ = 
CALCULATE (
    SUM ( 'Table'[Count] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Article] = SELECTEDVALUE ( 'Table'[Article] )
    )
)
NumberT_ =
COUNTROWS ( SUMMARIZE ( 'Table', 'Table'[Article], 'Table'[NumberT] ) )

Final output:

vyifanwmsft_0-1706682364546.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Ashish_Mathur
Super User
Super User

Hi,

Drag Article to the Table visual.  Write these measures

Time = sum(Data([TimeT])

C = sum(Data[Count])

TT = sum(Data([TimeTO])

NT = distinctcount(Data[NumberT])

Hope this helps.

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ryan_mayu
Super User
Super User

@GJE 

you can also do this in PQ

 

= Table.Group(#"Changed Type", {"Article"}, {{"time", each List.Sum([TimeT]), type nullable number}, {"count", each List.Sum([Count]), type nullable number}, {"timeT", each List.Sum([TimeT]), type nullable number}, {"numberT", each List.Count(List.Distinct([NumberT])), type nullable number}})

 

11.PNG

 

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




jdbuchanan71
Super User
Super User

Two measures should do it. 

The first to sum the count.

Sum Count = SUM ( YourTable[Count] )

The second to count the unique Article / NumberT pairs

NumberT Count = 
COUNTROWS(
    SUMMARIZE(YourTable,YourTable[Article],YourTable[NumberT])
)

jdbuchanan71_0-1706624110292.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors