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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Lavishnu
Regular Visitor

Dynamic row count on the visual dependent on field parameter values

Hi All,

 

I have a Table visual on my dashboard, the columns/fields using a field parameter to select columns dynamically in table visual.

The number of rows changes dynamically dependent on user choices, and the user can pick any combination of values in field parameters.

Need a row count in Card Visual. How many rows appear in the table visual dependent on field parameter selection?

1 ACCEPTED SOLUTION

Hi @Lavishnu 

Please try this:

First of all, I create a set of sample:

vzhengdxumsft_10-1708589504344.png

 

Home > transform data

If you want to save the original table, right-click the table and click reference:

vzhengdxumsft_11-1708589504345.png

 

All select the columns and click the Unpivot Columns.

vzhengdxumsft_12-1708589523784.png

 

vzhengdxumsft_13-1708589523787.png

 

Apply&Close.

Add a measure:

Measure 3 = COUNTROWS('Table (2)')

The result is as follow:

vzhengdxumsft_14-1708589556614.png

 

Best Regards

Zhengdong Xu
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

8 REPLIES 8
Daniel29195
Super User
Super User

@Lavishnu 

the number of rows in the tbale visual will depend on the field paramter selction. 

example .

if you have a tabe with 1000 customers and a table with 500 products

if you choose customers  to be shown in the visual, the visual will have 1000 rows, however if you select the productname,  the visual will show 500 products.

 

 

Hi @Daniel29195,

Yes, depending on selection, however if they picked customers, products, and other column, it shows the overall summary count of how many rows are there in the table visual based on selection.

@Lavishnu 

ok i got you, you are asking about the dax measure to write to get the count 😅

 

mmm, i think you need to create a measure that is counting the rows for each combination :

example let us say we have in the field paramter ,  customer and product .

 

so i need 3 measures : 

count when product is selected alone , 

count when customer is selected alone

and count when both are seleced . 

 

 

 

 

@Daniel29195 

 

In my scenario i have 20 columns the user can pick max 5 combination of values in field parameters.

Columns: Customers, Products, Category, Units, Levels, InStock etc 
Example: 
If Count when products selected alone
If Counts when products & customer where selected
If counts any columns selected where need summary count which ever values selected

Hi @Lavishnu 

Please try this:

First of all, I create a set of sample:

vzhengdxumsft_10-1708589504344.png

 

Home > transform data

If you want to save the original table, right-click the table and click reference:

vzhengdxumsft_11-1708589504345.png

 

All select the columns and click the Unpivot Columns.

vzhengdxumsft_12-1708589523784.png

 

vzhengdxumsft_13-1708589523787.png

 

Apply&Close.

Add a measure:

Measure 3 = COUNTROWS('Table (2)')

The result is as follow:

vzhengdxumsft_14-1708589556614.png

 

Best Regards

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

@Lavishnu 

im afraid there is no other way for now that im aware of .

 

 

found this link, could be helful 

https://community.fabric.microsoft.com/t5/Desktop/Count-rows-in-table-visual-with-Field-Parameters/t...

 

 

 

 

 

If this answers your question  ,  mark it as the solution so can you can help other people in the community find it easily .

I already tried the above solution. Its works for single value selection. If the users selects mutiples values in field parameter its showing overall count.

In my situation any combination users selects need that summary count.

@Lavishnu 

yes i understood what you want to achieve.

however i dont think this is possible for now . 

 

 to be able to do such a thing , you need to be able to summarize dynamically base on the selected columns selected from the field paramter, which i dont think is possible for now ( as far as i know ) . 

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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