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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

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

@Anonymous , 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

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , 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

Anonymous
Not applicable

hi @amitchandak 

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

Anonymous
Not applicable

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.