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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
miqueiasrlreis
New Member

Show multiple lines in single line per date

Hello again,


I have a requirement from user to develop some kind of chart to show, by equipment, all the orders assigned to it horizontally, similar to this I did in Excel

miqueiasrlreis_2-1709061173647.png

I tried most of the timeline visuals, Gantt Charts, but nothing is even similar to this. Multi-row Card was something almost there but still not what we need.

 

My structure is as follows  (hope the table dont get messy)

EquipmentOrder IDPlanned Start DatePlanned  End DateActual Start DateActual End Date
1ORDER ABC27/02/2024 00:00:0027/02/2024 08:00:0027/02/2024 01:00:0027/02/2024 09:00:00
1ORDER XYZ27/02/2024 08:00:0027/02/2024 13:00:0027/02/2024 09:00:0027/02/2024 14:00:00
2ORDER 12327/02/2024 02:00:0027/02/2024 07:00:0027/02/2024 01:00:0027/02/2024 08:00:00
2ORDER 45627/02/2024 12:00:0027/02/2024 17:00:0027/02/2024 09:00:0027/02/2024 14:00:00

 

In other words, I need to show per equipment per line, everything that is going to be produced with dates/times.


Is there any way to do anything like this?
Thanks in advance for the help

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@miqueiasrlreis 

output

Daniel29195_0-1709240072279.png

 

 

this is the following logic to obtain this : 

in power query , create the table as folllowing : 

Daniel29195_1-1709240209501.png

 

you need per to create time column . 

 

create a dimtime table : 

Daniel29195_3-1709240292718.png

 

 

 

and create a table :  dimtype with type as column name . 

Daniel29195_4-1709240378092.png

 

 

 

 

then: create a measure : 

Measure 3 = 

var selectedtime =  SELECTEDVALUE(dimtime[time])
var selectedtype =  SELECTEDVALUE(dimtype[type])



var res = 
SWITCH(
    TRUE(),
    selectedtype =  "Planned" , 
        var orderid = 
        CALCULATE(
        MAXx(
        FILTER(
            data1,
            selectedtime >= data1[planned start time] && selectedtime <data1[planned end time]
        ),
        data1[Order ID]
        ),
        REMOVEFILTERS(dimtime)
        )
        return orderid,

    selectedtype =  "Actual" , 
    var orderid = 
    CALCULATE(
    MAXx(
    FILTER(
        data1,
        selectedtime >= data1[actual start time] && selectedtime <data1[actual end time]
    ),
    data1[Order ID]
    ),
    REMOVEFILTERS(dimtime)
    )
    return orderid

        
   
)

return res

 

let me know if this works. 

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

 

 

 

 

 

 

View solution in original post

2 REPLIES 2
Daniel29195
Super User
Super User

@miqueiasrlreis 

output

Daniel29195_0-1709240072279.png

 

 

this is the following logic to obtain this : 

in power query , create the table as folllowing : 

Daniel29195_1-1709240209501.png

 

you need per to create time column . 

 

create a dimtime table : 

Daniel29195_3-1709240292718.png

 

 

 

and create a table :  dimtype with type as column name . 

Daniel29195_4-1709240378092.png

 

 

 

 

then: create a measure : 

Measure 3 = 

var selectedtime =  SELECTEDVALUE(dimtime[time])
var selectedtype =  SELECTEDVALUE(dimtype[type])



var res = 
SWITCH(
    TRUE(),
    selectedtype =  "Planned" , 
        var orderid = 
        CALCULATE(
        MAXx(
        FILTER(
            data1,
            selectedtime >= data1[planned start time] && selectedtime <data1[planned end time]
        ),
        data1[Order ID]
        ),
        REMOVEFILTERS(dimtime)
        )
        return orderid,

    selectedtype =  "Actual" , 
    var orderid = 
    CALCULATE(
    MAXx(
    FILTER(
        data1,
        selectedtime >= data1[actual start time] && selectedtime <data1[actual end time]
    ),
    data1[Order ID]
    ),
    REMOVEFILTERS(dimtime)
    )
    return orderid

        
   
)

return res

 

let me know if this works. 

 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

 

 

 

 

 

 

Anonymous
Not applicable

Hi @miqueiasrlreis 

 

PowerBI's built-in visual may not be able to meet your needs, if you want to achieve the same effect as your image, you can try using other custom visuals or using python scripts.

 

 

 

Best Regards,

Jayleny

 

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors