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
akkitek
Helper III
Helper III

Visual showing all dates on x-axis even after filtering

Hey Everyone,
I have line chart with dates in the x-axis. The dates from this table is connected to a date table, which i am using in the slicer to filte out data. While using the date slicer the data gets filtered but the past dates still show up on my visual on the x axis as "0". Any idea how I can show dates only for the dates selected in the slicer? 

akkitek_0-1682225786460.png

 

1 ACCEPTED SOLUTION

Hi,

Revise your measures to:

ActualLine = divide(SUM('SU ActualvsTargetline chart'[BillTypeHours]),SUM('SU ActualvsTargetline chart'[UltizationBasisHours]))
TargetLine = divide(SUM('SU ActualvsTargetline chart'[TargetBillHours]),SUM('SU ActualvsTargetline chart'[UltizationBasisHours]))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

12 REPLIES 12
Ashish_Mathur
Super User
Super User

Hi,

What measure have you written?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,
I am using the "start of week" field for the x-axis and the dax used to create this table is: 

SU ActualvsTargetline chart =

SUMMARIZE(
PBI_Utilization,
PBI_Utilization[Primarykeycolumn],
PBI_Utilization[Resource Cost Center Level 1],
PBI_Utilization[Resource Cost Center Level 2],
PBI_Utilization[Resource Cost Center Level 3],
PBI_Utilization[Resource Cost Center Level 4],
PBI_Utilization[Resource Cost Center Level 5],
PBI_Utilization[Resource Cost Center Level 6],
PBI_Utilization[Start of Week],
PBI_Utilization[Week_Num],
PBI_Utilization[Resource Display Name],
PBI_Utilization[Day],
"TargetBillHours",SUM(PBI_Utilization[Target billable hours]),
"BillTypeHours", SUM(PBI_Utilization[Billable Type Hours]),
"UltizationBasisHours",SUM(PBI_Utilization[Utilization Basis Hours])
)

Hi,

I'd suggest that you solve this with a measure rahter than a calculated column formula.  I can help, if you share the download link of the PBi file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks for your help @Ashish_Mathur . This is a calculated table. I am then using the field as it it from that table but to no avail.

Hi,

Revise your measures to:

ActualLine = divide(SUM('SU ActualvsTargetline chart'[BillTypeHours]),SUM('SU ActualvsTargetline chart'[UltizationBasisHours]))
TargetLine = divide(SUM('SU ActualvsTargetline chart'[TargetBillHours]),SUM('SU ActualvsTargetline chart'[UltizationBasisHours]))

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I have the saem problem. Why does the visual not automatically only show the selected dates.

State your question clearly.  Share some data to work with and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

This worked perfectly! Thanks Ashish!:)

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @akkitek 

I'm not sure what your calculated table is supposed to do. 

 

Since you have PBI_Utilization[Primarykeycolumn] as part of your SUMMARIZE, your summary table has the same number of rows as the original table.

 

You might want to rethink your approach.  As @Ashish_Mathur  mentioned, it would probably be best to use measures based on your original table.

 

Just my observation.

Thanks for your response @grantsamborn ! You were right! Ashish's measure did the trick!

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.