Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Deea_cz
Regular Visitor

Line Chart with Direct Query not showing correctly

Hi,

 

I am new to PBI and am creating a sales dashboard where i connected to my SQL database with Direct Query.

I wanted to create a historical chart for number of sales received (which worked when my data was imported but doesnt since i changed to Direct Query) , however my line chart seems to be a straight line with the total across each month  . I tried to create a date table but that doesnt seem to work either ,the chart just stays blank and i am not sure why. I dont know what i am doing wrong, any advice would be greatly appreciated. I am attaching the date format in my database below.

time.PNGpowerbi.PNG

thank you

1 REPLY 1
Anonymous
Not applicable

Hi  @Deea_cz ,

 

You can try the following dax:

Measure =
COUNTX(
    'Table',[SNumber])

Whether there are other tables in the Modeling View with relationships established, and whether "Assume Referential Integrity" is turned on.

Assume Referential Integrity setting in Power BI Desktop - Power BI | Microsoft Learn

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors