Forum Discussion
YogeshS
2 years agoFrequent Visitor
Need help creating a Matrix visual to display duration between dates
I am using a Matrix table where in row i added vehicle number and in Column I added date. I want to show 1 from the date of Breakdown till the Ready date. Help me to slove this. For Example: ...
- 2 years ago
Hi,
PBI file attached.
Hope this helps.
Anonymous
2 years agoNot applicable
Hi YogeshS,
I’d like to acknowledge the valuable input provided by the Uzi2019. His initial ideas were instrumental in guiding my approach. However, I noticed that further details were needed to fully understand the issue. In my investigation, I took the following steps:
I create two tables as you mentioned.
Then I create a Table 2.
Table 2 =
ADDCOLUMNS (
CROSSJOIN ( 'Date (2)', 'Table' ),
"IF",
IF (
'Date (2)'[Date] >= 'Table'[Breakdown Date]
&& 'Date (2)'[Date] <= 'Table'[Ready Date],
1,
0
)
)
Finally you will get what you want.
If you want to let the 0 become the blank, I think you can do some changes.
Table 2 =
ADDCOLUMNS (
CROSSJOIN ( 'Date (2)', 'Table' ),
"IF",
IF (
'Date (2)'[Date] >= 'Table'[Breakdown Date]
&& 'Date (2)'[Date] <= 'Table'[Ready Date],
1,
BLANK ()
)
)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.