Forum Discussion

KavithaPaka's avatar
KavithaPaka
New Member
7 years ago
Solved

power bi

Hi 

Hi All,

 

I created a Power BI report with so many calculated fields and now, on top of the calculated fields  , i  need a calculation similar to this: SUM(Jul:@currentMonth). Unable to think any idea. Cant use DAX or Custom Columns as they are all calculated columns and displayed in the report.

 

Regards,

Kavitha

  • v-piga-msft's avatar
    v-piga-msft
    7 years ago

    Hi KavithaPaka,

     

    For your requirement, you could use DATESBETWEEN function to create a measure.

     

    For example:

     

    Measure =
    VAR mindate =
        MIN ( 'Table1'[Date] )
    VAR currentdate =
        MAX ( 'Table1'[Date] )
    RETURN
        CALCULATE (
            SUM ( 'Table1'[Value] ),
            DATESBETWEEN ( 'Table1'[Date], mindate, currentdate )
        )
    

    If you still need help, please share your data sample as table format and your desired output so that we could help further on it.

     

    Best Regarsd,

    Cherry

4 Replies

  • v-piga-msft's avatar
    v-piga-msft
    Icon for Resident Rockstar rankResident Rockstar

    Hi KavithaPaka,



     

    I created a Power BI report with so many calculated fields and now, on top of the calculated fields  , i  need a calculation similar to this: SUM(Jul:@currentMonth). 

     


     

    I still have a little confused about your requirement.

     

    If it is convenient, could you share some data sample as table format and your desired output so that I can understand your scenario better and get the solution quickly.

     

    Best Regards,

    Cherry