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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
fbrickley
New Member

Advanced pivot? Advanced matrix view?

Hi everyone

 

I currently have data in the following format where each company can have multiple packages, sale currency and billing currency. Crucially the same company could within a particular month have multiple sale currencies, billing currencies and packages.

 

CompanyNamePackageNameSaleCurrencySaleAmountBillingCurrencyBillingAmountBillingDate
Company 1Package 1EUR101GBP12301-03-22
Company 1Package 2USD300GBP40001-02-22
Company 1Package 2ZAR400GBP30001-02-22

 

 I would like to put it into the format, where each combination of CompanyName, SaleCurrency, BillingCurrency has its own row:

   2022   
   Feb Mar 
CompanyNameSaleCurrencyBillingCurrencySaleAmountBillingAmountSaleAmountBillingAmount
Company 1EURGBP  101

123

Company 1USDGBP300400 

 

Company 1ZARGBP400300 

 

 

Where the year and month fields can be drilled down on. Essentially this is like a matrix but with some additional fields to summarise over held on the left hand side. I'd also like to be able to open up each row to see summaries for individual packages.

The data goes back several years and will continue to be added to month-by-month. Is this possible?

 

Currently I have the idea to create a unique ID for each combination of CompanyName, SaleCurrency and BillingCurrency, create a new table with those as the values in the first column - this I have managed. The next step would be to programatically create columns, one for each month, then fill in the required values. I really don't know where to start with this - any help is much appreciated!

 

Thanks

3 REPLIES 3
fbrickley
New Member

Thanks for your reply. Unfortunately your solution doesn't work when a company has multiple sale or billing currencies within the same month. I've made my requirements clearer to show that I would like these to have their own rows so that within each month it's possible to see what's happening for each company in each combination of currencies - is this possible?

Anonymous
Not applicable

Hi @fbrickley,

Perhaps you can consider moving the currency fields to row fields instead of column fields. Then power bi matrix visual will group your records based on company and currency fields.

Regards,

Xiaoxin Sheng

PijushRoy
Super User
Super User

Hi

 

Power BI Matrix Table

Change The alignment of the Column Header. If needed, I will share PBIX file, please let me know.

If solve the requirement, Please mark this answer as SOLUTION and give me Kedos.


PBI1.PNG
Power Query Steps
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45Wcs7PLUjMq1QwVNJRCkhMzk5MTwWzXUODgKShAYjt7hQAYhsZA0kDQ10DY10jAyMjpVgd7NqNgOzQYBcgaWxgANduAmaDtBtBtccCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [CompanyName = _t, PackageName = _t, SaleCurrency = _t, SaleAmount = _t, BillingCurrency = _t, BillingAmount = _t, BillingDate = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"CompanyName", type text}, {"PackageName", type text}, {"SaleCurrency", type text}, {"SaleAmount", Int64.Type}, {"BillingCurrency", type text}, {"BillingAmount", Int64.Type}, {"BillingDate", type date}}),
#"Inserted Month Name" = Table.AddColumn(#"Changed Type", "Month Name", each Date.MonthName([BillingDate]), type text),
#"Inserted Year" = Table.AddColumn(#"Inserted Month Name", "Year", each Date.Year([BillingDate]), Int64.Type),
#"Reordered Columns" = Table.ReorderColumns(#"Inserted Year",{"CompanyName", "PackageName", "SaleCurrency", "BillingCurrency", "SaleAmount", "BillingAmount", "BillingDate", "Month Name", "Year"})
in
#"Reordered Columns"




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.