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
Anonymous
Not applicable

Problem creating Calculated Column with Multiple Tables

I have 2 tables,  Table1 has all the people who work on the company. Table 2 has all the people who made sales on the last months and only this people (so i have repetitive people with a column of different periods (column period with 202203, 202204 and column sales 60%, 70%  for the seller Pedro as example).

 

On table 2 i have the percentage that the seller receive that month (top 100).

 

My problem is that i want to show in a visual matrix all the people i have in the company and the percentages by month for each one, and the people that doesn't appear on Table2 should show automatically 100%.

 

Possible example:

 

Name        Month            Percentage for Sales

Pedro        202203           60

Martin      202203            100

 

Martin doesn't appear at Table2 and he should receive automatically 100

 

I thought on creating a calculate column but i believe it doesn't work because a have repetitive data on Table 2 and missing data too.

 

I probably can't change the tables from the origin, so i have to do it at Power BI

 

From the already thank you very much to everyone

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Create a measure on table 2 , if the values is blank then make it 100

 

example

 

if(isblank([Percentage for Sales]),1, [Percentage for Sales])

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello amitchandak, thanks you for your answer!

 

I tried to do that but the problem is that if there are months that a person (example Pedro) doesn't have sales % he doesn't appear on Table2

 

Example:

 

We have Pedro, Martin and Juliet. 

 

Pedro and Martins always charge sales %, but Juliet never does it.

 

On Table2 we can see this:

 

Name        Month            Percentage for Sales

Pedro        202203           60

Pedro        202204           70

Pedro        202205           55

Martin      202203            100

Martin      202204            95

 

There isn’t Juliet there but i need to show in a visual like a matrix or a table this:

 

Name        Month            Percentage for Sales

Pedro        202203           60

Pedro        202204           70

Pedro        202205           55

Martin      202203            100

Martin      202204           95

Martin      202205           90

Juliet         202203           100

Juliet         202204           100

Juliet         202205           100

 

and probably with filters this (same period) :

 

Name        Month            Percentage for Sales

Pedro        202205           55

Martin      202205           90

Juliet         202205           100

 

Maybe now it's more clear what is my problem about.

 

Thanks you all, i always read the forum and learn a lot for you

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.