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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RedDwarf_803
Frequent Visitor

Display multiple values in same column/row in matrix

Hi
I want do display all events in categories (Cat) in a timeline matrix.
I have 7 Cat (A - G) and Cat A can have multiple events during one day.

The model is based on one fact table (FTT) and a timetable (TT). Fact table pic A
The timetable times is in 20 minutes intervals and is related to start time in FTT table. Pic B

Unfortunately I'm only able to display first event on each Cat in the timeline matrix. Pic C
Green frame illustrate first event for Cat A
Green frame in table to the right illustrate the start time and the end time
Red frame illustrate missing event for Cat A.
Red frame in table to the right illustrate the start time and the end time.
Start time 07:40 to End time 09:40 is missing in the matrix.

So the problem is my DAX only showing first event and I want to display all events.
My DAX measure

Test time =
Var sD = CALCULATE(MIN(FTT[Start time]),REMOVEFILTERS(TT) )
Var eD = CALCULATE(Min(FTT[End time]),REMOVEFILTERS(TT) )
Var xx= min(TT[Time])>=sd  && MIN(TT[Time]) <= eD
Var yy=SWITCH(TRUE(),xx,1,0)
Return
yy


Is there a way to fix this problem?
Or is there another visual i BI that solves the problem (only free visuals)?

Pic A
Dummy data

RedDwarf_803_2-1697276114440.png

Pic B

RedDwarf_803_1-1697276013151.png

Pic C

RedDwarf_803_3-1697276515350.png

 

1 ACCEPTED SOLUTION

@RedDwarf_803, Thanks for the .pbix file. Give this a shot and let me know if it's what you're after.

 

Test time 2 = 
VAR time =
    SELECTEDVALUE ( TT[Time] )
VAR startTime =
    CALCULATE (
        MIN ( FTT[Start time] ),
        REMOVEFILTERS ( TT ),
        FTT[End time] >= time
    )
VAR endTime =
    CALCULATE (
        MAX ( FTT[End time] ),
        REMOVEFILTERS ( TT ),
        FTT[Start time] <= time
    )
RETURN
    IF ( time >= startTime && time <= endTime, 1, 0 )

 

If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

View solution in original post

4 REPLIES 4
giammariam
Solution Sage
Solution Sage

Hey @RedDwarf_803, thanks for the screenshot and descriptions. Could you provide the example .pbix file (here's how)? Happy to help.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

@RedDwarf_803, Thanks for the .pbix file. Give this a shot and let me know if it's what you're after.

 

Test time 2 = 
VAR time =
    SELECTEDVALUE ( TT[Time] )
VAR startTime =
    CALCULATE (
        MIN ( FTT[Start time] ),
        REMOVEFILTERS ( TT ),
        FTT[End time] >= time
    )
VAR endTime =
    CALCULATE (
        MAX ( FTT[End time] ),
        REMOVEFILTERS ( TT ),
        FTT[Start time] <= time
    )
RETURN
    IF ( time >= startTime && time <= endTime, 1, 0 )

 

If this is enough to get you going please consider liking this reply and choosing it as the solution. Otherwise, I'm happy to help further.



Madison Giammaria
Proud to be a Super User 😄
LinkedIn

Do you frequently use Deneb to provide insights to your stakeholders? Have you considered sponsoring this free and open source custom visual? More info here!

Thanks Madison. Your DAX works fine

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.