Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Mr_Circ
Regular Visitor

Removing recurring values in a DAX meassure

Hi Community,

 

I have a level transmitter that transmits the level-difference in a tank for each day:

 

 

DateAmount (m3)
2022-08-01-15
2022-08-020
2022-08-03315
2022-08-04-18

 

I have made a DAX meassure code [Level in Tank] that estimates the level based on this (estimating that we started with 100 m3):

DateAmount (m3)
2022-08-0185

2022-08-02

85
2022-08-03400
2022-08-04382

 

My issue is that I want to be able to filter out the repeated 85 value occuring the 2022-08-02 so that the following result can be obtained:

DateAmount (m3)
2022-08-0185
2022-08-03400
2022-08-04382

 

Is there anybody who can help me with this?

 

Br

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Mr_Circ ,

 

I suggest you to try IF() function in your code.

M_Amount (m3) =
VAR _START = 100
VAR _RUNNING_TOTAL =
    CALCULATE (
        SUM ( 'Table'[Amount (m3)] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
    )
RETURN
    IF ( SUM ( 'Table'[Amount (m3)] ) <> 0, _START + _RUNNING_TOTAL, BLANK () )

Result is as below.

RicoZhou_1-1671171142049.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @Mr_Circ ,

 

I suggest you to try IF() function in your code.

M_Amount (m3) =
VAR _START = 100
VAR _RUNNING_TOTAL =
    CALCULATE (
        SUM ( 'Table'[Amount (m3)] ),
        FILTER ( ALL ( 'Table' ), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
    )
RETURN
    IF ( SUM ( 'Table'[Amount (m3)] ) <> 0, _START + _RUNNING_TOTAL, BLANK () )

Result is as below.

RicoZhou_1-1671171142049.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much Mr. Zhou.

 

This did the trick! 🙂

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.