Forum Discussion
Correct Row Count ( Example file attached)
I have a table visual that is made up of various columns (measures) and there is also a visual filter...
How can it get a correct row count figure? Hope that makes sense.
Thanks in advance.
- Anonymous2 years ago
Hi StuartSmith ,
Please update your measure.
Count Rows = VAR AllRows = COUNTROWS(FILTER(ALLSELECTED('Master Lookup Table'),[Closed before]=0)) Return AllRowsBest Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- Bibiano_Geraldo
Super User
Hi, i was checking your project, you need to remodel it, you are changing the filter but you're still seing the same thing.
But now asking your question, your problem its because the 'Master Lookup table' its not related with 'Date Table', so to be able to filter values using date your need to relate these tables mentioned above.
Look the experiment bellow, when you click into matrix the controws its working normally. - HotChilli
Community Champion
Hi StuartSmith ,
referring to your original question: To count the rows in the visual you will have to create a measure - using ADDCOLUMNS(SUMMARIZE( - to create a virtual tablewhich is the same as the visual table and then count the rows of that table.
All the same fields from the visual will have to be included in the virtual table and then the correct filtering applied to mimic the table visual.
I advise testing with a simplified version of your table to start with, for example, the fields from the visual plus one measure, and if you can get that to work, build it up.
- AnonymousNot applicable
Hi StuartSmith ,
Please update your measure.
Count Rows = VAR AllRows = COUNTROWS(FILTER(ALLSELECTED('Master Lookup Table'),[Closed before]=0)) Return AllRowsBest Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- StuartSmith
Power Participant
Unsure how I can change the report so it filters "Archvied" sites that are closed before the date slicer selection without using...
Closed before =Sumx(values('Master Lookup Table'[Buidling Code]),IF([Location Status] = "Archived" && [Date Closed] < [1) First Period Date] , 1,0)) - StuartSmith
Power Participant
Thanks guys, I will take a look, although not familiar with ADDcOLUMN & SUMMERISE, so will take a look.