Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Need help adding correct calculations into my Switch function using two tables:
1) PPI (premium per phone interaction) table
2) PROD sales table
Calculate "Total PPI" using this formula: Total Premium (from PROD Sales)/Total Count of PPI (from PPI)
There is active relationship between "Date" and inactive between "Advisor" (not sure if I set it up correctly)
I've included my PBI project with sample data and visuals to download/view:
Below my existing Switch statement; however I'm not getting correct results:
My priority is when selecting a single date to show the correct PPI result.
Total Premium selecting the date 5/15: $84,179.52
# PPI Calls from PPI Table for the selected date 5/15 = 142
Total Premium / PPI count = Total PPI
Expected Total PPI result: $592.81
TOTAL PREMIUM FOR "Field" Department (from Prod Sales table): $846,573. 08
PPI Count FOR "Field" Department (from PPI table): 1,202
Total Premium / PPI count = Total PPI
Expected Total PPI result when "Field" is selected: $704.30
Total Premium for "Call Center" Department (from Prod Sales table): $951,098.02
PPI Count for "Call Center" Department (from PPI table): 1,702
Total Premium/ PPI Count = Total PPI
Expected Total PPI result when "Call Center" is selected: $558.81
Expected PPI when no filter is applied: $619.03
Appreciate your help!
Solved! Go to Solution.
Hi @jabueg ,
The sample file you shared, have only 102 rows in PPI table and 48 rows on 15/5. as per these data, the calculation working fine. please share a revised sample file and the expected result based on the sample file to wokr on this further and validate.
Hi @jabueg ,
The sample file you shared, have only 102 rows in PPI table and 48 rows on 15/5. as per these data, the calculation working fine. please share a revised sample file and the expected result based on the sample file to wokr on this further and validate.
Sorry, here is the revised sample file! There should be 2,904 rows in the PPI table.
PBI PPI Project
I need to see these results when each "Department" is selected from the middle top visual:
TOTAL PREMIUM FOR "Field" Department (from Prod Sales table): $846,573. 08
PPI Count FOR "Field" Department (from PPI table): 1,202
Total Premium / PPI count = Total PPI
Expected Total PPI result when "Field" is selected: $704.30
Total Premium for "Call Center" Department (from Prod Sales table): $951,098.02
PPI Count for "Call Center" Department (from PPI table): 1,702
Total Premium/ PPI Count = Total PPI
Expected Total PPI result when "Call Center" is selected: $558.81
Also, need to add conditions to the Switch to calculate PPI when selecting from slicer:
- Date + Department
- Advisor + Date + Department
Example 1: Date + Department
If selecting date 5/16 and "Call Center" department, Total premium = $28,843.80; Count of PPI is 52 from PPI Table.
Result = $554.68
Example 2: Advisor + Date + Department
When selecting JOHN SMITH and date 5/12/25 and "Field" Department = Total Premium = $16,464.60; Count of PPI = 21 from PPI Table.
Result = $784.02
Thank you in advance!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
24 | |
10 | |
10 | |
9 | |
6 |