Forum Discussion

parry2k's avatar
parry2k
Icon for Super User rankSuper User
10 years ago
Solved

How to show data in dashboard for current month

Hello,

 

I created a dashboard to display sales by month. I have scheduled refresh for the data source but I want my dashboard to show sales by month for last 3 months. 

 

What I need to do in dashboard to automatically show data for current month + last 2 months instead of user has to filter and then pin on the dashboard.

 

I'm sure there is a way and need help.


Cheers,

P

  • Hi,

     

    You have to create an intermediate measure :

    Date difference = NOW() - MAX( [Date] )

    Then you put a filter :

    Date difference < 90

    And you will have your data of the last three months.

10 Replies

  • Rémi's avatar
    Rémi
    Icon for Resolver III rankResolver III

    Hi,

     

    You have to create an intermediate measure :

    Date difference = NOW() - MAX( [Date] )

    Then you put a filter :

    Date difference < 90

    And you will have your data of the last three months.

    • Enrico's avatar
      Enrico
      Frequent Visitor

      We are here in the service forum, not dekstop.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello,

       

      The filter is available as a date format only. I am unable to select the date difference as < 90 days.

       

      Can you help me?

       

      Thank you

      J

      • tgsteine's avatar
        tgsteine
        Regular Visitor

        You got any answer to this? I have the same question.

    • djnww's avatar
      djnww
      Icon for Impactful Individual rankImpactful Individual

      Thanks for the great tip, Rémi

       

      I'm kicking myself for not thinking of this workaround solution.

       

      - Daniel

  • WillT's avatar
    WillT
    Icon for Community Admin rankCommunity Admin
    You could use Q&A to generate your visuals - that supports filters like 'for this month' or 'in the last 2 months'. They'll be dynamically updated as time goes by.

    We do want to bring these capabilities to the Report view as well! Stay tuned!
  • The way I set it up required a few dimensions:

     

    Today = TODAY()

    StartOfMonth = TODAY() - DAY('MyTable'[Today]) + 1

    CurrentMonth = IF('MyTable'[Date] >='MyTable'[StartOfMonth] && 'MyTable'[Date] <= 'MyTable'[Today],1,0)

     

    Metric Current Month = IF(ISCROSSFILTERED('MyTable' [Month]),SUM('MyDataTable'[Metric]),CALCULATE(SUM('MyDataTable'[Metric]),FILTER('MyTable','MyTable'[CurrentMonth]= 1)))

     

    And the Metric Current Month should be giving you this months results.