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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sebastianqc
Helper I
Helper I

Problem with repeat columns from thursday to wednesday

Hello , i have a problem:

Data 452.66 is not repeated like the previous data

 
 

I need the data to be repeated from Thursday to Wednesday and in the field of the first image it takes the value of the previous

Thursday

 

Please help me 

 

Thanks 
Sebastián

1 ACCEPTED SOLUTION

HI @sebastianqc,

So you mean to use the next value to replace the current one? If this is a case, you can modify the formula to use 'next value' to replace 'previous':

Formatted =
VAR _prev =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] - 1 )
VAR _next =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] + 1 )
VAR _status =
    IF ( [Value] = _prev || [Value] = _next, 1, 0 )
RETURN
    IF ( _status <> 1, _next , [Value] )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @sebastianqc,

It seems like your source data records contain exception rows that break 'continue' status and you want to format these exception records with the next records to fix this issue, right?

If this is a case, you can refer to the following calculated column: 

Formatted =
VAR _prev =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] - 1 )
VAR _next =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] + 1 )
VAR _status =
    IF ( [Value] = _prev || [Value] = _next, 1, 0 )
RETURN
    IF ( _status <> 1, _prev, [Value] )

17.png

Notice: this formula requires an index field, if your table contains a unique value field(number,date type), you can use it to replace

[Index] part.

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft  Thanks for your recommendation, but it didn't work for me

Now it looks like this:
wrong.png

HI @sebastianqc,

So you mean to use the next value to replace the current one? If this is a case, you can modify the formula to use 'next value' to replace 'previous':

Formatted =
VAR _prev =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] - 1 )
VAR _next =
    LOOKUPVALUE ( T2[Value], T2[Index], [Index] + 1 )
VAR _status =
    IF ( [Value] = _prev || [Value] = _next, 1, 0 )
RETURN
    IF ( _status <> 1, _next , [Value] )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
sebastianqc
Helper I
Helper I

I copy the images from my problem and DAX

 

ProblemProblemfechas.pngimagen2.pngimagen3.pngimagen4.pngimagen5.pngimagen6.pngimagen7.pngimagen8.pngimagen9.pngimagen10.pngimagen11.png

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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