Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
P2 | 01.01.2021 | text5 | 1 |
P2 | 01.01.2021 | text6 | 2 |
P1 | 02.01.2021 | text7 | 2 |
P1 | 02.01.2021 | text8 | 3 |
P1 | 02.01.2021 | text9 | 4 |
I need to count number of rows when: Project is the same and Date is the same
i know it's not difficult, but unfortunately i can't find the right formula 😕
I am very grateful for every answer
Solved! Go to Solution.
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
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
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
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
ooooh it works 😄
thank you a lot
I just saw that I still have a problem, I have another column with true / false values, it should only count if the column = true
Hi, @RhoFox
Thanks for your feedback.
Please share your sample pbix file's link here, then I can try to look into it.
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
you can do a
summarizetable =
SUMMARIZE ( table[Project], table[Date], "RowCount", COUNTROWS ( table ) )
Proud to be a Super User!
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]
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
100 | |
100 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |