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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
bmms
Helper I
Helper I

Table loses filter when i add a measure

Hello,

 

In one page, i have one filter (filter from table product)  and a table with some columns and two of these columns are date (feature table columns).

 

image3.JPG

 

 

 

image1.JPG

 

I need to show the number of working days between these two dates.

So, i created the measure "delay" using the function NETWORKDAYS:

 

Delay =
var PubDate = IF ( SELECTEDVALUE(feature[PublishDate]) = BLANK (), TODAY(), SELECTEDVALUE(feature[PublishDate]) )
return  NETWORKDAYS(SELECTEDVALUE(feature[TargetDate]),PubDate,1)

 

When i add this measure in the table, the table loses the filter.

 

image2.JPG

 

I don't know what i am doing wrong.

 

Can you help me?

 

You can download the pbix example here:  https://we.tl/t-Qlg0S9nesS

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @bmms ,

 

According to your description, here are my steps you can follow as a solution.

(1)You can filter the Product column of the [Feature] table as a slicer.

vtangjiemsft_0-1665641208612.png

(2)Then you can create a measure.

Delay2 = SUMX('Feature',[Delay])

(2)Then the result is as follows.

 

vtangjiemsft_1-1665649323593.png

vtangjiemsft_2-1665649340784.png

 

Best Regards,

Neeko Tang

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

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Duration = NETWORKDAYS(Feature[TargetDate],coalesce(Feature[PublishDate],today()))
Measure = SUM(Feature[Duration])

Untitled.png


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

View solution in original post

6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Duration = NETWORKDAYS(Feature[TargetDate],coalesce(Feature[PublishDate],today()))
Measure = SUM(Feature[Duration])

Untitled.png


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

Hi @bmms ,

 

According to your description, here are my steps you can follow as a solution.

(1)You can filter the Product column of the [Feature] table as a slicer.

vtangjiemsft_0-1665641208612.png

(2)Then you can create a measure.

Delay2 = SUMX('Feature',[Delay])

(2)Then the result is as follows.

 

vtangjiemsft_1-1665649323593.png

vtangjiemsft_2-1665649340784.png

 

Best Regards,

Neeko Tang

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

Hello,

 

can you explain to my why it is necessary to create a new measure "Delay2"?

Why does it work badly if i only use one measure (delay)?

 

Best regards.

Anonymous
Not applicable

Hi @bmms ,

Because measure "Dealy" displays total incorrectly when filtering Product, I created a second measure to display total correctly.

 

Best Regards,

Neeko Tang

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

 

 

Hi,

 

Thanks for your explanation.

 

But, it's weird because in measure "Delay2" you use measure "Delay" and if "Delay" works wrong then should "delay2" also work wrong?

 

Sorry for these weird questions, but I would like to understand this solution well.

 

Best regards

Anonymous
Not applicable

Hi @bmms ,

Whether you need to create a second measure or not is based on the Total you need.If you want the totals to change as the selected item changes, you can create a second measure. If you want the totals to show all the totals and keep them fixed, just use the first measure, or you can hide the totals if you don't need them.

 

Best Regards,

Neeko Tang

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

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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 Solution Authors