Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Month filter

Hi all,

 

I created a bar chart that shows data of all previous months when I filter on one specific month. This is properly working with an unconnected date table. 

 

 

 

The issue is when I would like to add a matrix and I want to see the actuals of my selected month and ytd actuals.

It doesn't show the correct amount as there is no connection with my unfiltered date table and the data table. Now the question is, how I connect the data so that both my bar chart and matrix are working?

 

Desired result is when I filter on for example March :

Bar chart : should show actuals of January, February, March
Matrix : should show actuals of March and YTD (Jan,Feb,March)

 

My data connection is as followed :

date table (unconnected)

date table 2 relationship with data table

 

Thanks

Regards

 

2 Replies

  • Anonymous , Try like

     

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    var _min = eomonth(_max, -3) +1
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] >=_min && 'Date'[Date] <=_max))

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, Anonymous 

    Could you please tell me whether your problem has been solved?

    If yes, you could accept the helpful answer as solution to close this thread.

    Other community members will easily find the solution when they get the same issue.

     

    Best Regards,
    Community Support Team _ Eason