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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Drew_Johnson
New Member

Best way to roll up data?

I have a dataset with sales Invoices and related sales tax. For each sales invoice there could be a combination of city/county/state tax amounts. I've created a visual to summarize the data and noticed that I have multiple lines (see below):

Drew_Johnson_0-1683900741637.png

I would prefer to have each sales invoice have a single line with the city, state, and county tax shown. Is there a way to accomplish this? 

 

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @Drew_Johnson ,

According to your description, you want to show the name of tax(city tax/state tax) in one column and the value in another column. If so, go to Power Query, select the two columns at the same time and click "Unpivot Columns".

vyanjiangmsft_0-1684229931949.png

Result:

vyanjiangmsft_1-1684230047823.png

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

Best regards,

Community Support Team_yanjiang

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Drew_Johnson ,

According to your description, you want to show the name of tax(city tax/state tax) in one column and the value in another column. If so, go to Power Query, select the two columns at the same time and click "Unpivot Columns".

vyanjiangmsft_0-1684229931949.png

Result:

vyanjiangmsft_1-1684230047823.png

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

Best regards,

Community Support Team_yanjiang

Drew_Johnson
New Member

Here is a better look at our source data from our accounting system: 

Drew_Johnson_0-1683902098592.png

In this specific $129.98 sales transaction there were three separate tax amounts assessed:

City (BUFFALO $1.95)

County (LEON $.65)

State (TX $8.12). 

 

I would like to roll this up to a single line and have a separate column showing each tax amount in the visual. Any best practices to accomplish this?

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.