Forum Discussion

Prodosh's avatar
Prodosh
Frequent Visitor
7 years ago

Displaying store count for current month+ previous month in current month in dax query

Hi Team,

 

I have a requirement in which i need to calculate store count for current month and Previous month and display in current month.

For Ex :-  if my current month is 2018/11 then it should calculate 2018/10+ 2018/11 store count and display in 2018/11.

the data should be displayed in such a way as in image.Data format

The Code for the following calculation that i have done is for every single month. Code for Store count for every month

But i need the logic for calculating two months and displaying in single month. Any help would be appreciated. 

Thank you:smileyhappy:

3 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Prodosh

    Can you share the code and the data in text and table format so that it can be easily copied by people trying to help?

    Or share your pbix file 

     

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

    Create the below measure: 

     

    Store Count 2 = CALCULATE([Store count],DATEADD('Date'[Date],-1,MONTH))+[Store Count]