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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Farhan_Raza
Frequent Visitor

Count Rows Within Table Chart

Hello everyone,

 

Is there a way to count rows within the table chart ? I have a date column coming from calender table and another column (margin) from a Table (Table B) and the rest are from another table (Table A). I want to count rows where margin is >=1000.

 

Table relationship is :
Calender -> Table A -> Table B (single and one to many)

 

Please help

aaa.png

I want to get 8 as final answer

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Farhan_Raza 
Please try

Count =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            TableB,
            Calender[Date],
            TableA[PO#],
            "@Margin", SUM ( TableB[Margin] )
        ),
        [@Margin] >= 1000
    )
)

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Farhan_Raza 
Please try

Count =
COUNTROWS (
    FILTER (
        SUMMARIZE (
            TableB,
            Calender[Date],
            TableA[PO#],
            "@Margin", SUM ( TableB[Margin] )
        ),
        [@Margin] >= 1000
    )
)

A quick question, suppose the relationship is inactive between Table A & Table B, how do I incorporate within this formula ? Do I have to use USERELATIONSHIP function ?

Thank you so much. I knew it had to do with summarize function but I couldn't remember the format

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.