cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MrNoob Regular Visitor
Regular Visitor

All / slicer issue, discards data

Having an issue, so i work for an airline, and trying to take the sum of all passengers (Industry PAX), my formula works at the macro level, but when you get down to specific markets it starts to mess up.  

 

Example.  New York to Argentina.  There are 3 airports in New York,  Some airlines fly to one, others fly to the rest.  Lufthansa does not really fly that specific route, so when selecting Lufthansa the Industry total changes to only Lufthansa booking.  Which would be EWR (airport code)  and ignores the other 2 airports, even though they are selected in the slicer.

 

 

It's a simple-ish issue but hard to explain.

 

So I need my measure to bring in JFK and LGA data as well even though Lufthansa does not fly there

 

IND PAX = CALCULATE(sum('table'[pax]),ALL('table1'[JV carrier]))  

 

If i ignore the airport code slicer i get the wrong answer

 

My desired outcome would be when selecting more than one airport code, to gauge each airline evenly compared to the industry total

 

 

7 REPLIES 7
Highlighted
Super User
Super User

Re: All / slicer issue, discards data

If you post a realistic sample DB with non sensitive data, I will take a look for you. 

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Community Support Team
Community Support Team

Re: All / slicer issue, discards data

Hi @MrNoob

It is not clear about your example.

It is better to share a example(not realistic) dataset and expected result. 

for example:

table1->airports information

table2->air company information

table3->airlines information

relationships among tables

which columns added in the slicer

which slicer level to select, then what should be the result

 

Best Regards

Maggie

 

 

MrNoob Regular Visitor
Regular Visitor

Re: All / slicer issue, discards data

Hello all, 

 

Thank you for the replies,  I have created a sample data set and recreated the issue, i am wishing to correct.  I need the IND PAX number to not change when selecting the different carriers.  

 

 

 

 

https://1drv.ms/u/s!Aga7ypCzQZ2yjl4yxphW0knm-YQ2

Super User
Super User

Re: All / slicer issue, discards data

@MrNoob whcih slicer on this sample report refers to different carriers?




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

www.perytus.com
(MVP Data Platform)


MrNoob Regular Visitor
Regular Visitor

Re: All / slicer issue, discards data

I am sorry, it is the slicer that is label Mktg_carr_cd.  It has 2 letters like AC, UA, LH and so on listed in it.

Super User
Super User

Re: All / slicer issue, discards data

@MrNoob thanks for providing the data.  I am with @v-juanli-msft above although I have no issue with realistic data (actually I think this is better).  What you have provided is not a good approach, especially in this case.  This is a non-trivial problem to be solved.  There is not 1 easy magic formula that you are overlooking - it is a complex problem that will require good table design as well as (likely) some tricky DAX.  To solve the issue, you will need to set up tables like specified by @v-juanli-msft above.  You will also need to set up a matrix showing what your formula does now, and what numbers you expect to see.  It is often useful to show a working example in Excel to clearly desccribe the problem.  You know what you want but we don't, so you need to help us help you.

* Matt is a Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
Super User
Super User

Re: All / slicer issue, discards data

In continuation to @MattAllington email, there is great blog by Greg, please take a look at it.

 

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

 

 




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

www.perytus.com
(MVP Data Platform)