Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Compare folder datasets and visualize the data by date

Hi there, I'm a powerbi newby, and searched the forum and multiple other sites to find the answer. I think I have a lead what to start with (or use), but can't get it working.   I get my data via ...
  • MFelix's avatar
    7 years ago

    HI Anonymous ,

     

    I was abble to do a approach to what you may want but this is just to help you think to give you a better way I would need further details on the expected outcome.

     

    • Create a calendar table withou relation to your dataset 
    • Now create the following measure:
    ON / OFF =
    VAR Selected_DAte =
        MAX ( 'Calendar'[Date] )
    RETURN
        IF (
            CALCULATE (
                COUNT ( Table1[SystemNames] );
                FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte )
            ) > 1;
            "Existing";
            IF (
                CALCULATE (
                    COUNT ( Table1[SystemNames] );
                    FILTER ( ALL ( Table1[Date] ); Table1[Date] <= Selected_DAte )
                ) = 1
                    && CALCULATE (
                        COUNT ( Table1[SystemNames] );
                        FILTER ( ALL ( Table1[Date] ); Table1[Date] = Selected_DAte )
                    ) = 1;
                "New";
                IF (
                    CALCULATE (
                        COUNT ( Table1[SystemNames] );
                        FILTER ( ALL ( Table1[Date] ); Table1[Date] < Selected_DAte )
                    )
                        = BLANK ();
                    "Not Existing";
                    "Off"
                )
            )
        )
    • Use the calendar table as a slicer and then use the measure you created as a filter or a field in your visuals.

     

    This measure can be changed to use number instead of texts to make calculations of quantities and not text values, believe that everything is working for picking up previous values and not existing in a certain date but may need adjustments.

    Check attach PBIX file.

     

    Regards,

    MFelix