Forum Discussion

RekhaG's avatar
RekhaG
Frequent Visitor
7 years ago
Solved

Need help - Desktop - Dateadd

Hi,

 

I have created a Measure on Power BI Desktop, the formula that can be seen below:

In the Power BI Report, the total shows up for previous month, but not at individual month level, I am not sure why.

 

Any help is welcome.

 

Thanks,

Rekha

 

_PMCancelSum1 = CALCULATE(distinctcount(Policy[PolicyID]), Dateadd(PolicyCancelDate[CancelDate],-1,month))

 

  • The issue was because I didn't mark the PolicyCancelDate as a 'Date' Table. Once I did that, I got the desired result.

     

2 Replies

  • PattemManohar's avatar
    PattemManohar
    Community Champion

    RekhaG As per the screenshot, I can understand that measure is to calculate unique policy id counts for the previous month. But for 1st Record there is no previous month which will be 0 and for 2nd record it will show the previous month count i.e. 7857 which is showing on the total as well (As expected). But not sure, why it is not showing in the table visual.... Need more details and sample data to replicate the same...

  • RekhaG's avatar
    RekhaG
    Frequent Visitor

    The issue was because I didn't mark the PolicyCancelDate as a 'Date' Table. Once I did that, I got the desired result.