The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
i have been trying to figure this out but no luck.
this is sample data:
Date of update | Task |
10/01/2024 | A |
15/01/2024 | A |
15/01/2024 | B |
23/01/2024 | C |
10/02/2024 | A |
28/02/2024 | B |
03/03/2024 | B |
25/03/2024 | C |
30/03/2024 | A |
01/04/2024 | C |
15/05/2024 | D |
20/05/2024 | A |
I want to create a card that shows the following results from it (bold data)
number of tasks that have been updated once only= 1 task (i,e corresponds to task D)
number of tasks that have been updated 2 or 3 times = 2 task (i,e corresponds to task B & C)
number of tasks that have been updated 4 or more times= 1 task (i,e corresponds to task A)
instead all i have achieved is counting how many time a task has been updated. (example task A updated 5 time) this is not what im looking for.
any help is greatly apprreciated.
Thanks
Solved! Go to Solution.
Try these measures:
Tasks updated once =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] = 1 ) )
RETURN
vResult
Tasks updated 2 or 3 times =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] IN {2, 3} ) )
RETURN
vResult
Tasks updated 4 or more times =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] >= 4 ) )
RETURN
vResult
Proud to be a Super User!
Thanks!
Proud to be a Super User!
Try these measures:
Tasks updated once =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] = 1 ) )
RETURN
vResult
Tasks updated 2 or 3 times =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] IN {2, 3} ) )
RETURN
vResult
Tasks updated 4 or more times =
VAR vTable =
ADDCOLUMNS (
VALUES ( 'Table'[Task] ),
"@Count", CALCULATE ( COUNTROWS ( 'Table' ) )
)
VAR vResult =
COUNTROWS ( FILTER ( vTable, [@Count] >= 4 ) )
RETURN
vResult
Proud to be a Super User!