Forum Discussion
*HELP* How can I count date range occurrence with multiple columns?
- 4 years ago
Hi Anonymous ,
To reach that, a table with one column contains "updated","created"... is necessary. like the following:
Then create a measure via this code:
Measure = VAR _Created = COUNTROWS ( FILTER ( 'Table', [Created] <> BLANK () ) ) VAR _Resolved = COUNTROWS ( FILTER ( 'Table', [Resolved] <> BLANK () ) ) VAR _Updated = COUNTROWS ( FILTER ( 'Table', [Updated] <> BLANK () ) ) VAR _CHART_Date_of_First_Response = COUNTROWS ( FILTER ( 'Table', [[CHART]] Date of First Response] <> BLANK () ) ) RETURN IF ( HASONEVALUE ( 'Project Tab Column Name'[Project Tab Column Name] ), SWITCH ( SELECTEDVALUE ( 'Project Tab Column Name'[Project Tab Column Name] ), "Created", _Created, "Resolved", _Resolved, "[CHART] Date of First Response", _CHART_Date_of_First_Response, "Updated", _Updated ), _CHART_Date_of_First_Response + _Created + _Resolved + _Updated )So, the result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
To reach that, a table with one column contains "updated","created"... is necessary. like the following:
Then create a measure via this code:
Measure =
VAR _Created =
COUNTROWS ( FILTER ( 'Table', [Created] <> BLANK () ) )
VAR _Resolved =
COUNTROWS ( FILTER ( 'Table', [Resolved] <> BLANK () ) )
VAR _Updated =
COUNTROWS ( FILTER ( 'Table', [Updated] <> BLANK () ) )
VAR _CHART_Date_of_First_Response =
COUNTROWS ( FILTER ( 'Table', [[CHART]] Date of First Response] <> BLANK () ) )
RETURN
IF (
HASONEVALUE ( 'Project Tab Column Name'[Project Tab Column Name] ),
SWITCH (
SELECTEDVALUE ( 'Project Tab Column Name'[Project Tab Column Name] ),
"Created", _Created,
"Resolved", _Resolved,
"[CHART] Date of First Response", _CHART_Date_of_First_Response,
"Updated", _Updated
),
_CHART_Date_of_First_Response + _Created + _Resolved + _Updated
)
So, the result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
So this is close. Issue is date filter. As you can see I have a static filter that does this already but what I need is a date filter. for range start and range end. Any thoughts?