Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

User Input selecting a month

Below is a screenshot of some of my data.

What can I do so that Aug22 and 23 are not hardcoded? I want user to select month and these values change based on which month was selected. I dont even know what it is called in PBI and what to look for

 

 

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      thanks Idrissshatila , slicers are a great idea, however how would you sort out something like year to date calculations - e.g. if I select August in a slicer I want part of the calculation which looks like the following to look up that value from slicer:

       

      NumberOrders_Aug22 
      = CALCULATE(DISTINCTCOUNTNOBLANK(invoices),(DATESBETWEEN(inv[createdAt].[Date], START_DATE, ENDDATE)))
      
      ** where STARTDATE is a month Start of the Slicer
      ** ENDDATE is a month end of the slicer 

       

      Also I would need to show That month from -1 year

       

      Thanks!