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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
deniselias
Frequent Visitor

I need Help to filter 3 tables in COUNTROWS

I need help to know how to filter 3 tables in the CALCULATE function to display COUNTROWS of 3 columns with different information.

1 Status Amostra = CALCULATE(COUNTROWS('PO Manual','PO Manual - Andamento','SHeet' - I'),FILTERS('PO Manual'[STATUS FATURA]),FILTERS('PO Manual - Andamento'[STATUS FATURA]))
deniselias_0-1620230952690.png

 

Tables and columns:

1: 2: 3:

deniselias_1-1620231070664.pngdeniselias_2-1620231107817.pngdeniselias_3-1620231182696.png

 

 

 

 
1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @deniselias ,

I created a sample pbix file(see attachment), please check whether that is what you want.

Table = 
UNION (
    SUMMARIZE (
        'PO Manual',
        'PO Manual'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'PO Manual'[STATUS FATURA] ) )
    ),
    SUMMARIZE (
        'PO Manual - Andamento',
        'PO Manual - Andamento'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'PO Manual - Andamento'[STATUS FATURA] ) )
    ),
    SUMMARIZE (
        'SHeet',
        'SHeet'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'SHeet'[STATUS FATURA] ) )
    )
)

yingyinr_1-1620376861850.png

If the above one is not what you want, please provide some sample data in 3 tables and your expected result with specific examples. Please also provide the relationship setting among these tables if there is any relationship. Thank you.

Best Regards

Community Support Team _ Rena
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
v-yiruan-msft
Community Support
Community Support

Hi @deniselias ,

I created a sample pbix file(see attachment), please check whether that is what you want.

Table = 
UNION (
    SUMMARIZE (
        'PO Manual',
        'PO Manual'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'PO Manual'[STATUS FATURA] ) )
    ),
    SUMMARIZE (
        'PO Manual - Andamento',
        'PO Manual - Andamento'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'PO Manual - Andamento'[STATUS FATURA] ) )
    ),
    SUMMARIZE (
        'SHeet',
        'SHeet'[STATUS FATURA],
        "Status Amostra", CALCULATE ( COUNT ( 'SHeet'[STATUS FATURA] ) )
    )
)

yingyinr_1-1620376861850.png

If the above one is not what you want, please provide some sample data in 3 tables and your expected result with specific examples. Please also provide the relationship setting among these tables if there is any relationship. Thank you.

Best Regards

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

Thanks Yingyinr,

 

I love your solution!

I also managed to apply the expression:

deniselias_0-1620673445372.png

 

But your solution made me create another table and I love it!

 

Thaks, bye!

 

deniselias
Frequent Visitor

Thanks for the answer @selimovd 

 

I want to make a formula where I can bring information from 3 tables and make a different count for each situation.

 

Look at the shapes I tried:

deniselias_0-1620233101698.png

 

And that was the best way. But data from 2 tables is still missing. I want to include it in COUNTA:

deniselias_1-1620233163963.png

 

I hope you understand.

 

Thanks!

Hey @deniselias ,

 

how is the relationship between these 3 tables?

Where is the final table coming from? When you want a count from 3 other tables, how should that exactly work? Does it depend on a specific column, is the count from one single table?

 

Please explain a little more, we don't know your data, so it's hard to help you when you don't give much information.

 

Best regards

Denis

selimovd
Super User
Super User

Hey @deniselias ,

 

what exactly do you want to do?

The formula doesn't make any sense and I didn't really understand the descriptiont.

 

Thank you and best regards

Denis

 

I want to make a formula where I can bring information from 3 tables and make a different count for each situation.

 

Look at the shapes I tried:

deniselias_0-1620236906182.png

 

 

And that was the best way. But data from 2 tables is still missing. I want to include it in COUNTA:

deniselias_1-1620236905377.png

 

 

I hope you understand.

 

Thanks!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.