Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Power BI :: Show a Table of Measures on Rows Instead of Columns

GOAL: I’m trying to create a table in Power BI with different measure.

Every measure has a different filter, for example:

Realised Savings Azure App Service v2 = 
CALCULATE(SUM('Usage details'[costInBillingCurrency]), FILTER ( 'Usage details', 'Usage details'[meterCategory] = "Azure App Service" && CONTAINSSTRING('Usage details'[meterName.1], "v2") ))
Realised Savings Azure App Service v3 = 
CALCULATE(SUM('Usage details'[costInBillingCurrency]), FILTER ( 'Usage details', 'Usage details'[meterCategory] = "Azure App Service" && CONTAINSSTRING('Usage details'[meterName.1], "v3") ))
Realised Savings DTU = 
CALCULATE(SUM('Usage details'[costInBillingCurrency]), FILTER ( 'Usage details', 'Usage details'[meterCategory] = "SQL Database" && CONTAINSSTRING('Usage details'[meterName.1], "DTU") ))
Realised Savings vCore = 
CALCULATE(SUM('Usage details'[costInBillingCurrency]), FILTER ( 'Usage details', 'Usage details'[meterCategory] = "SQL Database" && 'Usage details'[meterName.1] = "vCore" ) )

Realised Savings VMs = 
CALCULATE ( SUM ( 'Usage details'[costInBillingCurrency] ), FILTER ( 'Usage details', 'Usage details'[meterCategory] = "Virtual Machines"  ) )

PROBLEM: I have checked the totals and they are alright. I’m happy, I reached my goal!

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

But when I try to put them into a table, horror: they create columns instead of rows:

enter image description here

I don’t want to have them like that.

What I want is this:

MeterCategory Total
Realised Savings Azure App Service v2 4147.091
Realised Savings Azure App Service v3 4889.731
Realised Savings DTU 12915.273
Realised Savings vCore 238.528
Realised Savings VMs 5859.370

So how to pivot this table?

I tried the Matrix but it seems like it’s not working.

Should I create a table instead of 5 different measures?

>Solution :

Use a matrix and switch values to rows.

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading