Forum Discussion
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 only the columns react properly, the line stays at max.
I alredy tried to link the "date" data of the two excel tables, but something strange happens and still the lines doesen't react properly.
(the calendar icon on the "date" to the right disappears)
does anyone knows how to solve?
many thanks in advance
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
5 Replies
- v-dineshya
Community Support
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
- ZeroLRegular Visitor
Thank you for your answer, It solved my problem!
- grazitti_sapna
Super User
Hi ZeroL,
Kindly share the tables, data model and the DAX which you've created for better understanding.
🌟 I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
💡 Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
🎖 As a proud SuperUser and Microsoft Partner, we’re here to empower your data journey and the Power BI Community at large.
🔗 Curious to explore more? [Discover here].
Let’s keep building smarter solutions together! - danextian
Super User
Did you use a separate dimension table or di you just use the same dates from your fact table? If you are using a date dimension table, is the column in the visual used coming from that table?
- ZeroLRegular Visitor
I'm sorry i think i didn't get the question.
To try clarify a bit:
the 1st tabel it's just a normal excel with a list of highway payments for each driver, (so it can be the same date has different payments from the same and different driver)
the second table it's a list of "T"s. (so each date has all the driver and if they were on "T" or not)
Hope this help