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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Measure Formula

My measure formula looks like this: Aktueller Wert = IF(SUM(List1[Wert])=0,0,SUM(List1[Wert]))

My values ​​are usually from Monday to Friday and always 1 day old. So on Tuesday I see Monday. However, I would like Friday to be displayed on Saturday or Sunday, for example. How do I do that?
 
thanks guys.
 
 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ryan_mayu , 

Thanks for your quick response.

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _1 =
    CALCULATE (
        MAX ( 'table1'[date] ),
        FILTER (
            ALL ( table1 ),
            table1[weekday] = 5
                && table1[date] < SELECTEDVALUE ( table1[date] )
        )
    )
VAR _2 =
    CALCULATE (
        MAX ( table1[date] ),
        FILTER ( ALL ( table1 ), table1[date] < SELECTEDVALUE ( table1[date] ) )
    )
VAR _3 =
    CALCULATE (
        MAX ( table1[value] ),
        FILTER ( ALL ( table1 ), table1[date] = _2 )
    )
RETURN
    IF (
        MAX ( table1[weekday] ) <= 5,
        _3,
        IF (
            MAX ( table1[weekday] ) >= 6,
            CALCULATE (
                MAX ( table1[value] ),
                FILTER ( ALL ( table1 ), table1[date] = _1 )
            )
        )
    )

vrongtiepmsft_0-1715222157283.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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 @ryan_mayu , 

Thanks for your quick response.

Hi @Anonymous ,

Please refer to my pbix file to see if it helps you.

Create a measure.

Measure =
VAR _1 =
    CALCULATE (
        MAX ( 'table1'[date] ),
        FILTER (
            ALL ( table1 ),
            table1[weekday] = 5
                && table1[date] < SELECTEDVALUE ( table1[date] )
        )
    )
VAR _2 =
    CALCULATE (
        MAX ( table1[date] ),
        FILTER ( ALL ( table1 ), table1[date] < SELECTEDVALUE ( table1[date] ) )
    )
VAR _3 =
    CALCULATE (
        MAX ( table1[value] ),
        FILTER ( ALL ( table1 ), table1[date] = _2 )
    )
RETURN
    IF (
        MAX ( table1[weekday] ) <= 5,
        _3,
        IF (
            MAX ( table1[weekday] ) >= 6,
            CALCULATE (
                MAX ( table1[value] ),
                FILTER ( ALL ( table1 ), table1[date] = _1 )
            )
        )
    )

vrongtiepmsft_0-1715222157283.png

 

How to Get Your Question Answered Quickly - Microsoft Fabric Community

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

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

 

 

 

 

 

ryan_mayu
Super User
Super User

could you pls provide some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.