Forum Discussion
Creating visualisation by summing the counts of two outputs
- 2 years ago
Hi Anonymous ,
Thanks for the reply. I tried this and I customized it
WorkItem1= CALCULATE (COUNTROWS( 'OKR'),'OKR'[Team]="External")WorkItem2= CALCULATE (
COUNTROWS( 'OKR'),'OKR'[Reference#] <> "")And I combined the output by adding both to get the overall.
Thanks!
Hi Jeyeline ,
Please try these measures:
count of work item 1 =
VAR __cur_year =
SELECTEDVALUE ( 'Date'[Year] )
VAR __cur_month =
SELECTEDVALUE ( 'Date'[Month Number] )
VAR __start_date =
DATE ( __cur_year, __cur_month, 1 )
VAR __end_date =
EOMONTH ( __start_date, 0 ) + 1
VAR __result =
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[Created Date] >= __start_date
&& 'Table'[Created Date] < __end_date
&& 'Table'[Team] = "External"
&& 'Table'[Reference Number] IN { "", "NA" }
) + 0
RETURN
__resultcount of work item 2 =
VAR __cur_year =
SELECTEDVALUE ( 'Date'[Year] )
VAR __cur_month =
SELECTEDVALUE ( 'Date'[Month Number] )
VAR __start_date =
DATE ( __cur_year, __cur_month, 1 )
VAR __end_date =
EOMONTH ( __start_date, 0 ) + 1
VAR __result =
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[Created Date] >= __start_date
&& 'Table'[Created Date] < __end_date
&& 'Table'[Team] = "External"
&& NOT 'Table'[Reference Number] IN { "", "NA" }
) + 0
RETURN
__resultcount of work item 3 =
VAR __cur_year =
SELECTEDVALUE ( 'Date'[Year] )
VAR __cur_month =
SELECTEDVALUE ( 'Date'[Month Number] )
VAR __start_date =
DATE ( __cur_year, __cur_month, 1 )
VAR __end_date =
EOMONTH ( __start_date, 0 ) + 1
VAR __result =
CALCULATE (
COUNTROWS ( 'Table' ),
'Table'[Created Date] >= __start_date
&& 'Table'[Created Date] < __end_date
&& 'Table'[Team] = "Internal"
&& NOT 'Table'[Reference Number] IN { "", "NA" }
) + 0
RETURN
__result
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum -- China Power BI User Group
Hi Anonymous ,
Thanks for the reply. I tried this and I customized it
WorkItem2= CALCULATE (
And I combined the output by adding both to get the overall.
Thanks!