0
votes

I do have data set with multiple date columns with different values of dates across all the months and years. I want to create a report wherein when I select a Year, I want to list the count of dates across each months on that year. Based on one Year field selection, how can I apply filter across different date fields to display the counts for that particular year

Lets say we have the data set like this

Date 1          Date 2 
1/3/2017        NA
1/23/2017      1/23/2017
1/14/2017      1/16/2017
2/2/2017       2/3/2017
NA             2/21/2017
3/1/2017        NA
3/3/2017       3/21/2017
.
.
.
12/1/2017       12/12/2017

My result should look like this when I pick the year 2017

    Date 1    Date 2
Jan      3        2
Feb      1        2
Mar      2        1
.
.
Dec      1        1

I was able to apply filter on one column but when I try to apply on other columns, I am not getting desired result

1
could you provide a feedback to the answer in order to understand if it was helpful or not? ttnxFabio Fantoni

1 Answers

0
votes

Assuming you want to interact with your dashboard using a parameter, you can create one string parameter in order to input the year you want to analyze.

After that you just need to create 2 calculated fields to count if that year is "contained" in your dates:

if contains(str([Date 1]),[Parameter]) then 1 else 0 end

Keep in mind that there's no gaurantee you'll get all the available months in the calendar unless you have data for all of them.

In order to consider even blank dates, I created a Date Global calculated field as follow:

ifnull([Date 1],[Date 2])

Once you've created this fields/parameter (show parameter control), you can simply add them in your worksheet ad I did in the image:

enter image description here