The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have two line charts I'd like to overlay - both use the same measure calculation for a score, but one is anchored on the "event date" for the year-month buckets, and the second is anchored on the "report date" for the year-month buckets. It is not atypical for an event to have a report date in a later month than the event occured.
Accordingly, the model has two date dimension tables (EventDateDim and ReportDateDim) with the DateKey from EventDateDim related to the EventDateKey on the EventFact, and the DateKey from ReportDateDim related to the ReportDateKey on the EventFact.
Creating individual line charts, the YearMonth buckets are drawn from the respective date dim tables, but I'd like to show both lines together instead of separated as so
Hi, @AnnieV
Have you solved your problem? If so, can you share your solution here and mark the correct answer as a standard answer to help other members find it faster? Thank you very much for your kind cooperation!
Best Regards
Yongkang Hua.
Hi @DataInsights ,
I've used userelationship in the past, but I'm not making the connection between doing that and being able to have the second line, which uses the same measure as the first?
Try creating two measures, each with the same logic except one of the measures contains USERELATIONSHIP. This would allow the X-axis to slice each measure using the appropriate date field (event date or report date).
Proud to be a Super User!
I would eliminate one of the date tables so your model has only one date table. Then create two relationships between the date table and EventFact; one of the relationships will be active and one will be inactive. Use the DAX function USERELATIONSHIP to invoke the inactive relationship.
https://dax.guide/userelationship/
Proud to be a Super User!