cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
coldfire
Frequent Visitor

ignore specific slicer in measure

hi,

I created a new measure using summarize. I want the station slicer is not to change the result of the ntrips measure. I used the removefilters command, but I could not achieve the desired result.

 
NTrips =
var a = SUMMARIZE('Table','Table'[LINE],'Table'[DIRECTION],'Table'[DATE],"ntrips", CALCULATE(MAX('Table'[TRIPS]),REMOVEFILTERS('Table'[STATION])))
return
sumx(a,[ntrips]
)

Sample file is here https://1drv.ms/u/s!AsQNupGZsOP-sRIvpROXCVhKtkjk?e=8nlfpQ

scr1.jpg

 

 

scr.jpg

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@coldfire , Try like

 

NTrips =
var a = SUMMARIZE(calculateTable('Table', all('Table'[STATION]) ),'Table'[LINE],'Table'[DIRECTION],'Table'[DATE],"ntrips", CALCULATE(MAX('Table'[TRIPS])))
return
sumx(a,[ntrips]
)

 

 

Best in such case to use independent table for STATION

 

Power BI Abstract Thesis: Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@coldfire , Try like

 

NTrips =
var a = SUMMARIZE(calculateTable('Table', all('Table'[STATION]) ),'Table'[LINE],'Table'[DIRECTION],'Table'[DATE],"ntrips", CALCULATE(MAX('Table'[TRIPS])))
return
sumx(a,[ntrips]
)

 

 

Best in such case to use independent table for STATION

 

Power BI Abstract Thesis: Need of an Independent Table in Power BI: https://youtu.be/lOEW-YUrAbE

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin

Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

hi @amitchandak 

After creating a independent station table, the issue was resolved. thank you so much.

thx for quick answer but ntrips value change  when i select multiple date with station.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.