Forum Discussion

JRive116's avatar
JRive116
Regular Visitor
10 months ago
Solved

Data Granularity

Hi everybody!
I'm a rookie in PBi and need some help.

I'm pulling 2 folders. Folder "A" has excel tables with minute increment flow measurement data for 12 months. Folder "B" has excel tables with hour increment flow measurement data for 12 months. I want to display both datasets in 1 line chart visual. I've tried creating many - one, many -many relationships using index tables to account for repeated values. When trying to use the visual, it shows what i think is the total count of datapoints that correspond to each "same" minute in a year.

Any help on this would be appreciated. 
Thank you!

  • JRive116 I split your TableA date/time into a date and time columns. I then created a third table of distinct time values at the 10 minute increment level by doing this:

    Time Table = DISTINCT( 'TableA'[DATE_TIME "A".2] )

    Relate this to both of your tables to the time columns in each.

    Plot it like this:

     

     

     

5 Replies

  • Hello !

    Thank you for posting on MS Fabric community.

    Keep 2 separate tables and both should be pointing to a unique minute level time table so you need to build a time table at minute grain for your 12 months 

    Time =
    VAR Start = MINX(ALL(FactMinute), FactMinute[DateTime])
    VAR End   = MAXX(ALL(FactMinute), FactMinute[DateTime])
    RETURN
    ADDCOLUMNS(
        CALENDAR(Start, End),
        "MinuteStamp",
         [Date]
    )
    

    and in both fact tables you need to have a key column that matches the time table minute stamp.

    For the minute fact you can use the minute date time and for the hourly fact you can create HourStart = DATETIME(Date, Hour, 0, 0) so it matches the time table at the exact hour.

    Your relationships should be :

    • Time[DateTime] (unique) : one-to-many to MinuteFact[DateTime]

    • Time[DateTime] (unique) : one-to-many to HourFact[HourStart]

    Both relationships can be active.

    Then create your measures.

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    JRive116 Sorry, having trouble following, can you post sample data as text and expected output?
    Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

    Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

    The most important parts are:
    1. Sample data as text, use the table tool in the editing bar
    2. Expected output from sample data
    3. Explanation in words of how to get from 1. to 2.

  • JRive116's avatar
    JRive116
    Regular Visitor

    Sample data

    Table "A"
    DATE_TIME "A" Flow "A"
    1/1/2025 0:000
    1/1/2025 0:100
    1/1/2025 0:200
    1/1/2025 0:300
    1/1/2025 0:400
    1/1/2025 0:500
    1/1/2025 1:000
    1/1/2025 1:100
    1/1/2025 1:200
    1/1/2025 1:300
    1/1/2025 1:400
    1/1/2025 1:500
    1/1/2025 2:000
    1/1/2025 2:100
    1/1/2025 2:200
    1/1/2025 2:300
    1/1/2025 2:400
    1/1/2025 2:500
    1/1/2025 3:000
    1/1/2025 3:100
    1/1/2025 3:200
    1/1/2025 3:300
    1/1/2025 3:400
    1/1/2025 3:500
    1/1/2025 4:000
    1/1/2025 4:100
    1/1/2025 4:200
    1/1/2025 4:300
    1/1/2025 4:400
    1/1/2025 4:500
    1/1/2025 5:000
    1/1/2025 5:100
    1/1/2025 5:200
    1/1/2025 5:300
    1/1/2025 5:400
    1/1/2025 5:500
    1/1/2025 6:0014.99
    1/1/2025 6:1032.18
    1/1/2025 6:2049.91
    1/1/2025 6:3053.86
    1/1/2025 6:4053.86
    1/1/2025 6:5053.86
    1/1/2025 7:0053.86
    1/1/2025 7:1055.85
    1/1/2025 7:2055.29
    1/1/2025 7:3052.95
    1/1/2025 7:4057.93
    1/1/2025 7:5079.69
    1/1/2025 8:00128.81
    1/1/2025 8:10191.08
    1/1/2025 8:20264.46
    1/1/2025 8:30344.84
    1/1/2025 8:40422.25
    1/1/2025 8:50499.01
    1/1/2025 9:00594.32
    1/1/2025 9:10625.26
    1/1/2025 9:20665.81
    1/1/2025 9:30682.56
    1/1/2025 9:40690.41
    1/1/2025 9:50695.31
    1/1/2025 10:00696.82
    1/1/2025 10:10695.72
    1/1/2025 10:20692.96
    1/1/2025 10:30686.34
    1/1/2025 10:40682.08
    1/1/2025 10:50678
    1/1/2025 11:00672.94
    1/1/2025 11:10667.42
    1/1/2025 11:20661.9
    1/1/2025 11:30655.47
    1/1/2025 11:40652.21
    1/1/2025 11:50647.72
    1/1/2025 12:00644.06
    1/1/2025 12:10640.73
    1/1/2025 12:20638.86
    1/1/2025 12:30636.95
    1/1/2025 12:40636.33
    1/1/2025 12:50636.46
    1/1/2025 13:00638.19
    1/1/2025 13:10646.27
    1/1/2025 13:20649.84
    1/1/2025 13:30653.06
    1/1/2025 13:40657.07
    1/1/2025 13:50661.05
    1/1/2025 14:00665.73
    1/1/2025 14:10670.4
    1/1/2025 14:20675.19
    1/1/2025 14:30678.59
    1/1/2025 14:40681.25
    1/1/2025 14:50684.21
    1/1/2025 15:00682.63
    1/1/2025 15:10678.52
    1/1/2025 15:20667.93
    1/1/2025 15:30647.76
    1/1/2025 15:40621.33
    1/1/2025 15:50568.5
    1/1/2025 16:00488.87
    1/1/2025 16:10403.95
    1/1/2025 16:20319.42
    1/1/2025 16:30239.2
    1/1/2025 16:40164.38
    1/1/2025 16:5098.43
    1/1/2025 17:0048.25
    1/1/2025 17:1017.36
    1/1/2025 17:203.78
    1/1/2025 17:300.58
    1/1/2025 17:400.18
    1/1/2025 17:500.11
    1/1/2025 18:000.1
    1/1/2025 18:100.06
    1/1/2025 18:200.03
    1/1/2025 18:300
    1/1/2025 18:400
    1/1/2025 18:500
    1/1/2025 19:000
    1/1/2025 19:100
    1/1/2025 19:200
    1/1/2025 19:300
    1/1/2025 19:400
    1/1/2025 19:500
    1/1/2025 20:000
    1/1/2025 20:100
    1/1/2025 20:200
    1/1/2025 20:300
    1/1/2025 20:400
    1/1/2025 20:500
    1/1/2025 21:000
    1/1/2025 21:100
    1/1/2025 21:200
    1/1/2025 21:300
    1/1/2025 21:400
    1/1/2025 21:500
    1/1/2025 22:000
    1/1/2025 22:100
    1/1/2025 22:200
    1/1/2025 22:300
    1/1/2025 22:400
    1/1/2025 22:500
    1/1/2025 23:000
    1/1/2025 23:100
    1/1/2025 23:200
    1/1/2025 23:300
    1/1/2025 23:400
    1/1/2025 23:500

     

    Table "B"
    DATE "B"TIME "B"  Flow "B"
    1/1/20251:002131
    1/1/20252:002023
    1/1/20253:001933
    1/1/20254:001864
    1/1/20255:001829
    1/1/20256:001811
    1/1/20257:001879
    1/1/20258:001875
    1/1/20259:001996
    1/1/202510:002132
    1/1/202511:002275
    1/1/202512:002440
    1/1/202513:002559
    1/1/202514:002700
    1/1/202515:002815
    1/1/202516:002986
    1/1/202517:003089
    1/1/202518:003139
    1/1/202519:003086
    1/1/202520:002918
    1/1/202521:002843
    1/1/202522:002644
    1/1/202523:002402
    1/2/20250:002177

     

    Expected output (hopefully without the steps)
    Dark Blue is "B"
    Light Blue is "A"

     

    I want to be able to plot, in one visual, in a contiuous manner both lines. Currently is Sums up all of the values per point. I dont really have a clear answer as to how to get from 2 to 3. :S 
    Greg_Deckler 

     

    • Greg_Deckler's avatar
      Greg_Deckler
      Community Champion

      JRive116 I split your TableA date/time into a date and time columns. I then created a third table of distinct time values at the 10 minute increment level by doing this:

      Time Table = DISTINCT( 'TableA'[DATE_TIME "A".2] )

      Relate this to both of your tables to the time columns in each.

      Plot it like this: