Forum Discussion

ZeroL's avatar
ZeroL
Regular Visitor
5 months ago
Solved

Date link doesn't apply on a chart

Hi everyone.   i have maybe a simple problem, but still can't get the soultion..   this chart comes from 2 different excel tables and are linked by employees. When i try to filter by month...
  • v-dineshya's avatar
    5 months ago

    Hi ZeroL ,

    Thank you for reaching out to the Microsoft Community Forum.

     

    Hi danextian  and grazitti_sapna , thank you for your prompt responses.

     

    It is a Power BI model relationship issue, not a visual problem. Please follow below steps to fix the issue.

    1. Create separate Date table and connect your both tables to it.

    DateTable = CALENDAR (DATE(2023,1,1), DATE(2026,12,31))

    Month = FORMAT(DateTable[Date], "YYYY-MM")

    2. Please create below relationships.

    DateTable[Date] --> Payments[Date]
    DateTable[Date] --> T_Status[Date]

    Note: Relationship must be One-to-Many and Cross filter: Single direction Date --> tables.

    3. Use DateTable in Slicer. (DateTable[Date])

    4. Use data type as "Date" not DateTime.

    5. In your measure , change the filter context like below.

    T_Count =
    CALCULATE(
    COUNT(T_Status[Driver])
    )

    6. Make sure X-axis is: DateTable[Month] or Date, NOT from either table.

     

    If still you are facing issue. Please share the sample data and expected output that will help us to do repro from my side and will provide .PBIX file based on sample data.

     

    Regards,

    Dinesh