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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
buhari91
Frequent Visitor

Table Visual get Total Rows on current selection

Hello Power BI Community,

I have a table visual as below, where Total Sign-ups is a measure, and rest columns are coming from Signups table.
My requirement is to add a column that will have 1 as a value and then show the total at the end. This table will filter records based on date and location slicers.

Can anyone please help me to get the solution

buhari91_0-1668702026685.png

Thanks in advance

5 REPLIES 5
v-luwang-msft
Community Support
Community Support

Hi @buhari91 ,


Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.

Best Regards
Lucien 

Ttaylor9870
Helper III
Helper III

Hi @buhari91,

 

Go to transorm data and then click the data tab and click on index column and you're going to want to select custom....

 

Ttaylor9870_1-1668789623964.png

 

Then use this...

 

Ttaylor9870_2-1668789694661.png

 

 

This will add the 1's to every row and hopefully this will work, ket me know if it does or not😊

 

Ttaylor9870_3-1668789749079.png

 

 

Many Thanks,

 

Taylor

 

 

 

 

Ttaylor9870
Helper III
Helper III

Hi @buhari91,

 

This DAX will work, make a new calculated column and use this...

 

Adding 1 Measure = IF('Table'[firstname] <> BLANK(), 1, IF('Table'[firstname] = BLANK(), 1)) ​

 

It bascially says if there is data in the first column or if it's blank both outcomes return a 1 in your new calculated column.

 

Many Thanks,

 

Taylor

Hi @Ttaylor9870 

This column is not helping me.
I created calculated column as suggested

Row_Counts = IF('Signups'[firstname] <> BLANK(), 1, IF('Signups'[firstname] = BLANK(), 1))

 

buhari91_1-1668705301742.png

As I have multiple entries for any given firstnames, it is summing up the numbers as below:

buhari91_2-1668705820511.png

And when filter is applied through slicer it is not bringing any values on the Table visual. 

buhari91_0-1668705038582.png

 

 

Hi @buhari91 ,

 

Could change the aggregation on the column from Sum to DistinctCount? Click on the table -> Go to the fields pane -> Click the small arrow on the right of the columns name -> Change from sum to Count(Distinct).

 

Many Thanks,

 

Taylor

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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