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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
raj777karthik
Microsoft Employee
Microsoft Employee

measure value to be static if should not be filtered

I have a below measure created .This measure has been used in table visual with more columns .But this measure used in table be static while we are using date range slicer from anothr table.I have date range slicer when i slice the date range other columns in table should change but this measure shoulkd be static.

 

Blocked =
var a=CALCULATE(DISTINCTCOUNT(Sales[Salesid]),ALLEXCEPT(order,order[OrderId]),Sales,Sales[PriorityP0]=1||Sales[PriorityP1]=1 ||Sales[PriorityP2]=1)
var b=DISTINCTCOUNT(Sales[Salesid])
return
calculate(coalesce(DIVIDE(a,b),0)

 

In this Sales and order tables are connected and both direction has been used.Slicer dats is from Header table and is connected with order table which is also both direction.Header and Sales table are connected.

 

Note:We cannot change the direction to single.As other visuals might get affected.Please help me on this

2 REPLIES 2
amitchandak
Super User
Super User

@raj777karthik , Assuming Sales is fact and order is the dimension, I have done change in allexcept. It will filter only order id

 

Blocked =
var a=CALCULATE(DISTINCTCOUNT(Sales[Salesid]),ALLEXCEPT(Sales,order[OrderId]),filter(Sales,Sales[PriorityP0]=1||Sales[PriorityP1]=1 ||Sales[PriorityP2]=1))
var b=DISTINCTCOUNT(Sales[Salesid])
return
calculate(coalesce(DIVIDE(a,b),0)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Sales is dimension and order is fact.I have changed as per you have suggested but still not working.

In var A i  need s to show sales per order with any of one Priroity =1

In Var B i need to take distinct count of sales id

Then i should divide both A and B .

This output should be static irrespectie os slicer value.

 

Have used remove filter as well .

calculate(coalesce(DIVIDE(a,b),0),REMOVEFILTERS(Header[Header CreatedOn Date]))

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.