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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
S95
Regular Visitor

Adding columns

Good morning,

 

I'm working on creating a report that shows daily sales broken down by employee, date, and location. I have a table that has all of this already broken down, but I need to calculate adjusted net sales from a new table that has adjustments. I tried to do this with a new measure: Adjusted net Sales = Sum(Query1[net_sales) + sum(Adjustments[amount]), and while it does add/remove the adjustments based on the employee, it is performing the adjustment on each entry for the employee instead of just that date and location. I'm pretty sure this is a simple thing I'm missing, but I'm still learning PowerBI so its a matter of me not fully understanding expressions.

 

For reference, both tables have the following columns: Date, Location, and Employee. The query1 table also has a net_sales, whereas the adjustment table has an amount column.

 

Any help is greatly appreciated.

 

 

1 ACCEPTED SOLUTION

I apologize but I actually figured it out while I was putting a test file together. My file was conflicting the two tables in regards to the date. I created a table that was specifically a list of dates and added relationships from both original sheets and this appears to have solved my problem.

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@S95 , You formula should work fine, all three dimensions Date, Location, and Employee. It should just depend on what is used in visual.

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

I apologize but I actually figured it out while I was putting a test file together. My file was conflicting the two tables in regards to the date. I created a table that was specifically a list of dates and added relationships from both original sheets and this appears to have solved my problem.

Hi @S95  ,

 

I'm glad that you have solved your issue by yourself. Would you mark useful reply as answer to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

My apologies as I've been off for a few days.

Let me create a sample file and I'll upload it.

 

Thanks,

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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