Forum Discussion
RhoFox
5 years agoFrequent Visitor
Count row with same values in two columns
Hi There I need help with some column "count" Project Date Text Count P1 01.01.2021 text1 1 P1 01.01.2021 text2 2 P1 01.01.2021 text3 3 P1 02.01.2021 text4 1 P...
- 5 years ago
Hi, RhoFox
Please check the below for creating a new column.
Count CC =
VAR currentproject = 'Table'[Project]
VAR currentdate = 'Table'[Date]
RETURN
RANKX (
FILTER (
'Table',
'Table'[Project] = currentproject
&& 'Table'[Date] = currentdate
),
'Table'[Text],
,
ASC
)
selimovd
5 years agoMost Valuable Professional
Hey RhoFox ,
you can do that with a CALCULATE and then you can tell which column should be considered for the count with the ALLEXCEPT function:
Count Measure =
CALCULATE(
COUNTROWS( myTable ),
ALLEXCEPT(
myTable,
myTable[Project],
myTable[Date]
)
)
If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
Best regards
Denis
Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic