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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
BIuser45
Frequent Visitor

Filtering issues

I have some trouble with filtering.

 

I have three tables: Predicted Sales Amount, Actual Sales Amount and Actual Sales Purpose, combined together called Total Table. The Total Table has inherited all the columns from the three tables. I There is a column called Product Type in the Actual Sales Amount table. Only the Actual Sales Amount table contains the product type column. I combined them together because I want the total projected sales amount (Predicted sales amount + actual sales amount). The Actual Sales Purpose table has a column of sales purposes from actual sales. The Predicted Sales Amount table has a column that indicates the sales purpose from predicted sales. Only the Predicted Sales Amount table contains the predicted status column. The combined table has a column that has the sales purpose combined from the Actual Sales Purpose and Predicted Sales Amount table called Combined Purpose. The Total Table could show filter the sales purposes for the total projected sales amount, but it could not filter the product type for the actual sales amount and then add the predicted sales amount to create the total projected sales amount. What happens is when I filter the sales purpose and combined purpose on the Total Table, it only generates the actual sales amount and not the total projected sales amount. Similarly, when I filter the predicted status and the combined purpose on the Total Table, it only generates the predicted sales amount and not the total projected sales amount. Like it resets the filter and everything. Why is that?

 

What I want is the, filtered product type on the actual sales amount + the filtered predicted status on the predict sales amounts = total projected sales or filtered product type on the actual sales amount + the predict sales amounts = total projected sales or actual sales amount + the filtered predicted status on the predict sales amounts = total projected sales. All three cases with the combined purpose column filtered. Is there a way to do that?

2 REPLIES 2
Anonymous
Not applicable

Hi @BIuser45 ,

Can you provide us some expected result and sample data. Thank you.

Best Regards

Xianda Tang

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

 

Hi v-xiandat-msft, here is the sample data below, which might not make sense, but with real data it is something similar.

 

There are actual sales table, customer table, actual sales purpose table, predicted sales table, total sales table which are power query data. Those are sample data.

 

Actual Sales Table, PowerQuery (PQ)

 

Sales IDProduct TypeCustomer IDFinance TypeSales AmountActual Sales AmountCombined Sales AmountSaving IDFund IDInterest ID
1Electronics32 1000     
2Hardware56 2000     
3Saving Plans78Yes3500350035001  
4Hedge Funds89Yes350035003500 2 
5Bonds90Yes300030003000  3

 

Customer Table, PQ:

 

Customer ID
32
56
78
89
90
12
34
35

 

Actual Sales Purpose Table (PQ)

 

Sales IDSales Purpose IDSales PurposeCombined Purpose
31SavingsSavings
42FundFund
53InterestInterest

 

Predicted Sales Table, PQ

 

Predicted Sales IDCustomer IDSales PurposePredicted StatusCombined PurposeUncomfirmed SalesPredicted Sales/Expected SalesCombined SalesSaving IDFund IDInterest ID
145FundDeclinedFund12345     
278InterestNo InterestInterest23456     
312SavingsFinalizedSavings26000260002600076  
434FundIn ProgressFund700007000070000 56 
535InterestEarlyInterest300003000030000  23

 

Total Table, PQ:

Sales IDProduct TypeCustomer IDFinance TypeSales AmountActual Sales AmountCombined Sales AmountSaving IDFund IDInterest IDPredicted Sales IDCustomer IDPredicted StatusCombined PurposeUncomfirmed SalesPredicted Sales/Expected Sales
1Electronics32 1000           
2Hardware56 2000           
3Saving Plans78Yes3500350035001     Savings  
4Hedge Funds89Yes350035003500 2    Fund  
5Bonds90Yes300030003000  3   Interest  
          145DeclinedFund12345 
          278No InterestInterest23456 
      2600076  312FinalizedSavings2600026000
      70000 56 434In ProgressFund7000070000
      30000  23535EarlyInterest30000

30000

 

The remaining four tables are the results of the total sales table that I want.

 

Total Table Result 1

 

PurposeActual SalesPredicted salesCombined/Projected Sales%
Savings1000026000360000.18367
Interest2000030000500000.2551
Fund40000700001100000.56122
Total700001260001960001

 

The first total table result is if I do not filter anything.

 

Total Table Result 2

 

PurposeActual SalesPredicted salesCombined/Projected Sales%
Savings1000026000360000.18367
Interest2000030000500000.2551
Fund40000700001100000.56122
Total700001260001960001

 

The second result is if I only filter sales product type from the total table as saving plans and hedge funds.

 

Total Table Result 3

 

PurposeActual SalesPredicted salesCombined/Projected Sales%
Savings1000026000360000.18367
Interest2000030000500000.2551
Fund40000700001100000.56122
Total700001260001960001

 

Third result is if I only filter the predicted status from the total table as finalized.

 

Total Table Result 4

 

PurposeActual SalesPredicted salesCombined/Projected Sales%
Savings350026000295000.46825
Interest350030000335000.53175
Total700056000630001

 

Fourth result is if I only filter the purpose of the total table. 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.