Forum Discussion
RedDwarf_803
2 years agoFrequent 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...
- 2 years ago
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.
RedDwarf_803
2 years agoFrequent Visitor
giammariam
2 years agoSolution Sage
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.
- RedDwarf_8032 years agoFrequent Visitor
Thanks Madison. Your DAX works fine