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
You need to provide sample data (in a format people can copy) in 2. table, what data is in these 3 columns? Then expected results in 3. , where is the range 01/01/2022 thru 01/31/2022 coming from? Any logic to calculate the range is 23?
| Resolution | Created | Updated | Resolved | [CHART] Date of First Response |
Thank you for the reply. So, I am new to this forum and do not see a way to upload file here. Can you tell me where I can upload that or send it to?
- Anonymous4 years agoNot applicable
Hi Anonymous
You can paste some sample data, normally people share via one drive, or other ways...I guess not everyone has the option to upload file for now. Also pm you my email address if you would like to send over sample file