Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
4 years ago
Solved

Calculation between dates

Hello community,

I'm trying to add a waterfall diagram to my report to show the tons coming in and out, but the problem is that my history I separate it only in the "M" shift and separated by days, as seen in the diagram.

I have my variation table with inputs and outputs between each shift

However, I have noticed that I have to add the variation of the shift of two different dates (For example, Shift "V" July 12 + Shift "M" July 13), since what my waterfall diagram does is add the two shifts of the same day (Shift "M" July 12 + Shift "V" July 12) which is as shown in the photo

Here's what Power BI adds up

And this is what I want you to add up

Thanks in advance

  • Hi, Syndicate_Admin 

    You can consider creating a custom category based on 'Turno' and 'Fecha LC'.

    Calculated column:

     

    Category =
    IF (
        'Table'[Turno] = "V",
        'Table'[Fecha LC] & "V to " & ( 'Table'[Fecha LC] + 1 ) & "M",
        'Table'[Fecha LC] - 1 & "V to " & 'Table'[Fecha LC] & "M"
    )
    

     

    Then, replace ‘Fecha LC' with the new field 'Category' and apply it to the category of the waterfall chart.

     

    Best Regards,
    Community Support Team _ Eason

1 Reply

  • v-easonf-msft's avatar
    v-easonf-msft
    Community Support

    Hi, Syndicate_Admin 

    You can consider creating a custom category based on 'Turno' and 'Fecha LC'.

    Calculated column:

     

    Category =
    IF (
        'Table'[Turno] = "V",
        'Table'[Fecha LC] & "V to " & ( 'Table'[Fecha LC] + 1 ) & "M",
        'Table'[Fecha LC] - 1 & "V to " & 'Table'[Fecha LC] & "M"
    )
    

     

    Then, replace ‘Fecha LC' with the new field 'Category' and apply it to the category of the waterfall chart.

     

    Best Regards,
    Community Support Team _ Eason