Forum Discussion
Counting Rows in a Matrix [unsolved 15/01]
Greg_Deckler
Would you be able to show me what you mean? I have attached my pbix file here: https://we.tl/t-vd5jYugdD6
FU Sure, that helps greatly.
Measure =
VAR __Table =
ADDCOLUMNS(
DISTINCT('Project Risks Query-xxx'[Risk ID]),
"__DistinctCount", [DistinctCount]
)
VAR __Result = COUNTROWS(FILTER(__Table,[__DistinctCount] > 1 && [Risk ID] = "PRID001"))
RETURN
__Result- FU3 years agoHelper IV
What can I do with this measure? Note that my table consists of many rows, I've currently got a measure in to show me the rows that have different values in the date column so essentially I'm tracking data changes over time of the exact same table.
I want to create a card or something which counts the number of rows based on the date created slicer that's shown.
Would be helpful if you could show an example on the pbix file and send it over 🙂
- Greg_Deckler3 years agoCommunity Champion
FU I used your PBIX when I created that measure. So you can just copy and paste it into your PBIX. I'm not quite certain what you are going for. Your matrix has some filters on it, do you want those same filters included in your count or not?
- FU3 years agoHelper IV
So let me explain:
I have imported the table "project risks" from an excel file on those different days shown in the filter so that I could see the changes in my values over time.
1) want to select a range from the date slicer and see what rows have changed from each table.
2) I want to create a card which counts those rows.
E.g. If I select 22/12- 24/12 and I have 3 rows that have changes between those dates then I want a measure which counts those 3 rows and displayed in a card.
So ultimately a measure which dynamically counts the number of rows shown in the matrix when filtered by "date created"