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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Bleppich
Frequent Visitor

extend table information / omitting redundant information

Hello,
I have a table with historical data where each entry (ID) has date and a corresponding state.

123401.01.2020True
123402.01.2020True
123403.01.2020True
999901.01.2020True
999902.01.2020False


For a lot of IDs the state never changes (1234 is always True) and I was wondering if I could "extend the data" so that I only have to store/load a single line. Meaning I would just have the latest value for ID = "1234" (yes) and could "calculate" the values for the remaining dates by just using the current value.
I want to filter visuals with this value and use the date column as an axis.
Do I need to work with "Valid_from" an "Valid_till" columns? Because that would get tricky when it comes to the axis

2 REPLIES 2
Bleppich
Frequent Visitor

Sorry, I think I didn't make myself clear. I know how to sort the values out. I actually want the opposite. To get from a single line in the table to multiple.

from:

123401.01.2020True

to this:

123401.01.2020True
123401.02.2020True
123401.03.2020True
..........
Anonymous
Not applicable

HI @Bleppich,

You can try to use the following measure formula to check current row status and return flag. Then you can use this on visual level filter to filter records:

IsDisplay = 
VAR currDate =
    MAX ( 'Table'[Date] )
VAR statusList =
    CALCULATETABLE (
        VALUES ( 'Table'[Status] ),
        ALLSELECTED ( 'Table' ),
        VALUES ( 'Table'[ID] )
    )
VAR Uniqueflag =
    IF ( COUNTROWS ( statusList ) = 1, 1, 0 )
VAR _lastDate =
    CALCULATE (
        MAX ( 'Table'[Date] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Status] IN statusList ),
        VALUES ( 'Table'[ID] )
    )
RETURN
    IF ( Uniqueflag = 1 && currDate <> _lastDate, 0, 1 )

1.png

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.