Forum Discussion
Dealing with multiple dates in single table with one date slicer in power BI resport for all dates
- 2 years ago
uma91 First, create a Date table with a continuous range of dates that will act as the common date dimension for all your date columns. Use the USERELATIONSHIP function to create measures that calculate the desired metrics based on the different date columns.
Example Measure for Streaming Count:
Streaming Count =
CALCULATE(
SUM('FactTable1'[StreamsCount]),
USERELATIONSHIP('DateTable'[Date], 'FactTable1'[StreamingDate])
)
Example Measure for Issued Tickets Count:
Issued Tickets Count =
CALCULATE(
SUM('FactTable2'[TicketsIssuedCount]),
USERELATIONSHIP('DateTable'[Date], 'FactTable2'[IssuedDate])
)Write DAX measures using USERELATIONSHIP to switch between the different date columns.
Use these measures in your table visual, ensuring the single date slicer filters the Date table.Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
uma91 First, create a Date table with a continuous range of dates that will act as the common date dimension for all your date columns. Use the USERELATIONSHIP function to create measures that calculate the desired metrics based on the different date columns.
Example Measure for Streaming Count:
Streaming Count =
CALCULATE(
SUM('FactTable1'[StreamsCount]),
USERELATIONSHIP('DateTable'[Date], 'FactTable1'[StreamingDate])
)
Example Measure for Issued Tickets Count:
Issued Tickets Count =
CALCULATE(
SUM('FactTable2'[TicketsIssuedCount]),
USERELATIONSHIP('DateTable'[Date], 'FactTable2'[IssuedDate])
)
Write DAX measures using USERELATIONSHIP to switch between the different date columns.
Use these measures in your table visual, ensuring the single date slicer filters the Date table.
Hope it works.
Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!