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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Hitha
New Member

Need a Dax to make a measure for counting the rows on a dynamic table using 2 parameters [Power BI]

The Row count needs to be displayed on a Key card next to the table visual.

The Data of the Table is from two Parameters (Multi-selection) :
'Selected Dimensions P3'[Select Dimensions]
'Selected Measures P3'[Select Measures]
Rows on the Table keeps changing according to the field selection by the viewer. The row count on the key card should simultaneously change to the current number of rows displayed on Table Visual.


Screenshot 2025-05-08 164804.pngScreenshot 2025-05-08 165034.png

 

1 ACCEPTED SOLUTION
v-bmanikante
Community Support
Community Support

Hi @Hitha ,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

 

As per our understanding of your scenario, here's the DAX measure that you can use to dynamically count the rows shown in a table visual based on the viewer's selection through field parameters:

 

DynamicTableRC =
VAR DimFields =
    ADDCOLUMNS(
        'Selected Dimensions P3',
        "IsVisible", ISINSCOPE([Select Dimensions])
    )

VAR VisibleDims =
    FILTER(DimFields, [IsVisible])

RETURN
    COUNTROWS(
        SUMMARIZE(
            'FactTable',          // Replace with your actual base data table
            VisibleDims
        )
    )

 

If this doesn't meet your scenario, we kindly request you to, share a sample dataset that mimics your use case (without sensitive information) along with the expected output, or upload a sample PBIX file so we can review the structure and assist with a more accurate solution.

 

Regards,

B Manikanteswara Reddy

View solution in original post

4 REPLIES 4
v-bmanikante
Community Support
Community Support

Hi @Hitha ,

 

Thank you for reaching out to Microsoft Fabric Community Forum.

 

As per our understanding of your scenario, here's the DAX measure that you can use to dynamically count the rows shown in a table visual based on the viewer's selection through field parameters:

 

DynamicTableRC =
VAR DimFields =
    ADDCOLUMNS(
        'Selected Dimensions P3',
        "IsVisible", ISINSCOPE([Select Dimensions])
    )

VAR VisibleDims =
    FILTER(DimFields, [IsVisible])

RETURN
    COUNTROWS(
        SUMMARIZE(
            'FactTable',          // Replace with your actual base data table
            VisibleDims
        )
    )

 

If this doesn't meet your scenario, we kindly request you to, share a sample dataset that mimics your use case (without sensitive information) along with the expected output, or upload a sample PBIX file so we can review the structure and assist with a more accurate solution.

 

Regards,

B Manikanteswara Reddy

Hi @Hitha ,

 

We wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

 

If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

B Manikanteswara Reddy

Hi @Hitha ,

 

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?

If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Please don't forget to give a "Kudos vbmanikante_0-1747314266428.png" – I’d truly appreciate it!

 

Regards,

B Manikanteswara Reddy

Hi @Hitha 

 

May I ask if you have gotten this issue resolved?

 

If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Please don't forget to give a "Kudos vbmanikante_1-1747587257447.png" – I’d truly appreciate it!

 

Regards,

B Manikanteswara Reddy

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors